Skip to content

Instantly share code, notes, and snippets.

View lipp's full-sized avatar

Gerhard Preuss lipp

View GitHub Profile
@lipp
lipp / wc.html
Created November 17, 2017 10:02
minimal web components test
<!DOCTYPE html>
<html>
<head>
<script>
const template = document.createElement('template')
template.innerHTML = `
<style>#foobar {background: red;}</style>
<h1 id="foobar">I am foo bar</h1>
<slot></slot>
`
@lipp
lipp / EayvVr.markdown
Created December 19, 2014 07:49
EayvVr
@lipp
lipp / Jet-Add-State.markdown
Created June 6, 2014 12:42
A Pen by Gerhard Preuss.
@lipp
lipp / Auto-Resize-Canvas.markdown
Created May 22, 2014 09:28
A Pen by Gerhard Preuss.

Auto Resize Canvas

An auto resizing canvas with fixed aspect ratio based on talk of Ethan Marcotte and article at alistapart.

A Pen by Gerhard Preuss on CodePen.

License.

@lipp
lipp / client.lua
Created May 23, 2013 10:34
luasec non block example based on luasec/sample/want (dont forget to generate certs from luasec/sample/certs!) start like this: $ lua server_ev.lua & $ lua client.lua & $ lua client.lua & $ lua handshake.lua &
--
-- Test the conn:want() function
--
-- Public domain
--
require("socket")
require("ssl")
local params = {
mode = "client",
@lipp
lipp / async_spec.lua
Last active December 10, 2015 22:28
busted mockup for async tests with e.g. lua-ev providing: describe,before,before_each,it clone and run locally: lua async_spec.lua; lua sync_spec.lua; lua copas_spec.lua;
package.path = './?.lua;'..package.path
local ev = require'ev'
local loop = ev.Loop.default
require'busted'
describe(
'All async in this context',
function()
before(
async,
@lipp
lipp / gist:2761607
Created May 21, 2012 10:01
reading ZMQ_FD
#include <zmq.hpp>
#include <assert.h>
int main(int argc, char* argv[])
{
zmq::context_t context(1);
// setup xreq and get fd
zmq::socket_t xreq(context, ZMQ_XREQ);
xreq.bind("tcp://127.0.0.1:13333");