This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BGCOLOR='#550000' | |
TEXTCOLOR='#eeeeee' | |
TEXTFONT='Ubuntu-Light' | |
TEXTSIZE=72 | |
TEXT="\nHello this is a very long text\nwrapped in many lines" | |
# Put screenshot into a frame, change +86+242 if you change a frame PNG | |
composite -geometry +86+242 $1 frame.png $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const h = (e, p = {}, ...c) => ({e, p, c: [].concat(...c)}); | |
const render = (vlist, dom) => { | |
vlist = [].concat(vlist); | |
vlist.forEach((v, i) => { | |
let n = dom.childNodes[i]; | |
let s = (v.s = (n ? n.s : v.s) || {}); | |
while (typeof v.e === 'function') { | |
v = v.e(v.p, s, u => Object.assign(s, u) && render(vlist, dom)); | |
} | |
v.s = s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function chain(callback) { | |
var queue = []; | |
function _next() { | |
var cb = queue.shift(); | |
if (cb) { | |
cb(_next); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2013 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package trikita.foo; | |
import android.content.Context; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.LinearLayout; | |
import trikita.anvil.RenderableView; | |
import static trikita.anvil.DSL.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var on = false; | |
setInterval(function() { | |
on = !on; | |
LED1.write(on); | |
LED2.write(!on); | |
}, 500); | |
console.log('Hello, world!'); | |
E.setUSBHID({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// A simple echo server for SCTP sockets, it creates a socket with a syscall then wraps it into a net.Listener interface | |
// to make goroutine-safe (otherwise reading or writing would block the whole host thread). | |
// All it does is echoing back all the received data from the client. | |
// | |
package main | |
import ( | |
"fmt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// A simple SCTP echo client to demonstrate wrapping low-level socket file descriptor into a net.Conn. | |
// Should work fine on linux, darwin, freebsd, dragonfly and solaris (where syscalls are available for SCTP sockets). | |
// | |
package main | |
import ( | |
"errors" | |
"fmt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gridLayout() | |
space() | |
foregroundLinearLayout() | |
navigationMenuItemView() | |
navigationMenuView() | |
scrimInsetsFrameLayout() | |
appBarLayout() | |
collapsingToolbarLayout() | |
coordinatorLayout() |