This file contains hidden or 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/bash | |
# -s for screen region, -w for window | |
MODE=${1:--s} | |
# Output file name | |
FILE="$HOME/Images/Captures/`date +%FT%T.gif`" | |
# Temporary files | |
TMPDIR="/tmp" |
This file contains hidden or 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/bash | |
FILE="$HOME/Images/Captures/`date +%FT%T.gif`" | |
TMP_AVI=$(mktemp /tmp/outXXXXXXXXXX.avi) | |
(yad --notification --image media-playback-stop --command "bash -c 'echo q; quit'") |\ | |
ffcast -s % ffmpeg -y -f x11grab -show_region 1 -framerate 15 \ | |
-video_size %s -i %D+%c -codec:v huffyuv \ | |
-vf crop="iw-mod(iw\\,2):ih-mod(ih\\,2)" $TMP_AVI \ |
This file contains hidden or 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 path = require("path") | |
const fs = require("fs") | |
// -- Webpack configuration -- | |
const config = {} | |
// Application entry point | |
config.entry = "./src/server/index.js" |
This file contains hidden or 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 trace(target, name, descriptor) { | |
if (!DEBUG) { | |
return descriptor | |
} | |
const original = descriptor.value | |
const traced = function(...args) { | |
console.trace(`${this.constructor.name}#${name}`, args) | |
return original.call(this, ...args) |
This file contains hidden or 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/bash | |
msgid() { | |
FLAG=0 | |
echo msgid '"'$*'"' | |
} | |
msgstr() { | |
if [ $FLAG -eq 0 ]; then | |
echo msgstr '"'$*'"' |
This file contains hidden or 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
import {isObject} from "./utils" | |
import Dispatcher from "./dispatcher" | |
export default class Component { | |
constructor() { | |
this.rootNode = null | |
this.props = {} | |
// Add dispatcher observers | |
if (this.constructor.observers) { |
This file contains hidden or 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 assign = require("object-assign") | |
var Base = { | |
create: function create(properties) { | |
var base = Object.create(this) | |
properties = properties || {} | |
properties.parent = this | |
assign(base, properties) |
This file contains hidden or 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/bash | |
render() { | |
marked source.md > output.html | |
} | |
cleanup() { | |
if [ -d /proc/$surf_pid/ ]; then | |
kill $surf_pid | |
fi |
This file contains hidden or 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
// -- Emitter mixin | |
function Emitter(base) { | |
var _eventHandlers = [] | |
function on(eventName, callback) { | |
var filter = makePattern(eventName) | |
_eventHandlers.push({ | |
filter: filter, | |
callback: callback |
This file contains hidden or 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
ifeq ($(OS),Darwin) | |
install: | |
npm install -g | |
else | |
install: | |
sudo npm install -g | |
endif | |
OU |