Skip to content

Instantly share code, notes, and snippets.

View felixrabe's full-sized avatar
🦀
Focusing on Rust

Felix Rabe felixrabe

🦀
Focusing on Rust
View GitHub Profile
@felixrabe
felixrabe / index.jade
Created April 24, 2013 20:31
Impress DSL using jQuery/Zepto.js
!!! 5
html(lang="en")
head
meta(charset="utf-8")
title Unicode
link(rel="stylesheet", href="styles.css")
body
#impress
.s(data-impress="million 0 0 4")
h1 1 000 000
@felixrabe
felixrabe / felixcalc.py
Last active December 17, 2015 17:29
Sublime Text 2 FelixCalculatorCommand { "keys": ["alt+c"], "command": "felix_calculator" }
import sublime, sublime_plugin
from math import *
class FelixCalculatorCommand(sublime_plugin.TextCommand):
def run(self, edit):
window = self.view.window()
window.show_input_panel('Enter operation and operand (e.g. +i, +20, sqrt(x), -, =):', '',
self.on_done, None, None)
#!/usr/bin/env coffee
readline = require 'readline'
occ = Object.create null
# http://stackoverflow.com/a/15554600
rd = readline.createInterface
input: process.stdin
output: process.stdout
@felixrabe
felixrabe / gitrl
Last active December 20, 2015 19:29
gitrl
#!/bin/bash
n=50 # default
if [[ $1 != "do" && $1 != "undo" ]] ; then
echo "Usage: gitrl { do [N=$n] | undo }"
exit 1
fi
n=${2:-$n}
13-08-21 09:15:30 19793 CRITICAL Flow Uncaught exception #1355480641 in line 227 of /Users/felixrabe/Sites/eis-flow-mamp/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Booting/Scripts.php: Execution of subprocess failed with exit code 255 and no output.
The erroneous command was:
FLOW_ROOTPATH='/Users/felixrabe/Sites/eis-flow-mamp/' FLOW_CONTEXT='Development' XDEBUG_CONFIG='idekey=FLOW_SUBREQUEST remote_port=9001' "/Applications/MAMP/bin/php/php5.4.10/bin/php" -c '/Library/Application Support/appsolute/MAMP PRO/conf/php.ini' '/Users/felixrabe/Sites/eis-flow-mamp/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/../../../../Scripts/flow.php' 'typo3.flow:core:compile' - See also: 201308210915240306a9.txt
@felixrabe
felixrabe / Typo3-RTE.md
Last active December 21, 2015 20:48
Alternativen zum Typo3 RTE HTML Editor

rtehtmlarea-Ersatz

Stand: 28. August 2013, von Felix Rabe.

Problem

Das Update von TYPO3 Version 4.4 auf Version 4.5 bereitet im IE 8 Probleme mit rtehtmlarea. Das Debugging gestaltet sich schwierig. Deshalb wird erwogen, ein RTE-Plugin als Alternative zu rtehtmlarea einzusetzen.

@felixrabe
felixrabe / nsum
Created September 14, 2013 08:53
nsum
#!/usr/bin/env coffee
byline = require 'byline' # v. 3.1.2
stream = byline process.stdin
sum = 0
stream.on 'data', (line) ->
sum += parseInt line
@felixrabe
felixrabe / git-exec
Last active December 23, 2015 09:09
git-exec
#!/bin/bash
# Author: Felix Rabe
# Public Domain, available from https://gist.github.com/felixrabe/6612477
# Like 'git cherry-pick' with added execution support.
# When it sees that the commit message starts with '$ ', it will execute the
# commit, then create a new commit with all the changes, instead of just
# cherry-picking.
@felixrabe
felixrabe / fibers-2.patch
Created March 1, 2014 21:07
node-fibers (d1d59a9f55e269d) patch for node-webkit (0.9.2) based on https://github.com/rogerwang/node-webkit/issues/533#issuecomment-32596155
--- ./node_modules/fibers/src/coroutine.cc-0 2014-03-01 22:05:44.000000000 +0100
+++ ./node_modules/fibers/src/coroutine.cc 2014-03-01 22:05:55.000000000 +0100
@@ -40,7 +40,7 @@
v8::Locker locker(isolate);
assert(isolate != NULL);
floor_thread_key = 0x7777;
- for (pthread_key_t ii = coro_thread_key - 1; ii >= (coro_thread_key >= 20 ? coro_thread_key - 20 : 0); --ii) {
+ for (pthread_key_t ii = coro_thread_key - 1; ii >= (coro_thread_key >= 30 ? coro_thread_key - 30 : 0); --ii) {
if (pthread_getspecific(ii) == isolate) {
floor_thread_key = ii;
unalias l 2> /dev/null || true
function l() {
if [[ $# = 0 ]] ; then
arg=.
else
arg=$1
fi
if [[ -d $arg ]] ; then
ls -al "$arg"