Skip to content

Instantly share code, notes, and snippets.

@To1ne
To1ne / keyboard-much.org
Last active Feb 28, 2018 — forked from pjaspers/keyboard-much.markdown
Everything you never wanted to know about keyboards at 10to1
View keyboard-much.org
@To1ne
To1ne / Proposals.md
Last active Sep 18, 2017
Twitterpp mechkeys group buy
View Proposals.md

Model

  • Planck
  • Ergodox
  • Let's split
  • Dactyl

Switches

  • Matias Quiet Clicky
@To1ne
To1ne / nil.md
Last active Jan 1, 2016
NULL, nil, null, undef
View nil.md

C/C++

void* a = NULL; // not sure about all compiler

C++11

void* a = nullptr;
@To1ne
To1ne / negativ-faces.el
Last active Dec 18, 2015
negativ-faces: give all faces their negative color
View negativ-faces.el
;; negativ-faces
;; give all faces their negative color.
;;
;; Works great on the default theme:
;; * Just remove all `(load-theme xzy)' from your .emacs.d
;; * Restart emacs
;; * Run `(negativ-negative-all-faces)'
;; * To undo, run `(negativ-negative-all-faces)' again
;;
;; based on http://www.emacswiki.org/emacs/AngryFruitSalad
View swap2ram.sh
#!/bin/sh
err="not enough RAM to write swap back, nothing done"
mem=`free|grep Mem:|awk '{print $4}'`
swap=`free|grep Swap:|awk '{print $3}'`
test $mem -lt $swap && echo -e $err && exit 1
swapoff -a && swapon -a &&
exit 0
View markup-emacs.rb
#
# A little function to add html markup around emacs commands found in text.
#
def markup_emacs(text)
# defuns are put between () # TODO nested defuns
text.gsub!(/(\([^\)]+\))/, '<code>\1</code>')
# keyboard strokes
# -> M-x some-defun
# -> and other combo's
key = '(?:&lt;[^&]+&gt;|\w\b|[^\s\w])'
View klavaro-homebrew.patch
diff --git a/src/Makefile.in b/src/Makefile.in
index 3489d6f..6e982a8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -60,7 +60,7 @@ am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(CCLD) $(subst -export-dynamic,--export-dynamic, $(AM_CFLAGS)) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
View gist:254841
==> Build Environment
PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
CFLAGS: -O4 -march=core2 -mmmx -msse4.1 -w -pipe
MAKEFLAGS: -j2
CC: /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2
==> Downloading http://downloads.sourceforge.net/project/klavaro/klavaro-1.4.0.tar.bz2
File already downloaded and cached to /Users/toine/Library/Caches/Homebrew
/usr/bin/tar xf /Users/toine/Library/Caches/Homebrew/klavaro-1.4.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/klavaro/1.4.0 --disable-debug --disable-dependency-tracking
View homebrew-klavaro.log
» brew install klavaro
==> Downloading http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz
######################################################################## 100.0%
==> Patching
######################################################################## 100.0%
patching file gettext-runtime/gnulib-lib/setenv.c
patching file gettext-tools/gnulib-lib/execute.c
patching file gettext-tools/gnulib-lib/pipe.c
patching file gettext-tools/gnulib-lib/setenv.c
patching file gettext-tools/gnulib-lib/unsetenv.c
View beech.sh
function beech() {
len=`echo "$1" | wc -m`
if [ "$len" -gt "140" ]
then
echo "Tweet length is $len, exceeds max. 140 characters"
return
fi
echo -n 'Sending Tweet... '
# TODO correct parameter for extended regexes => BSD: `sed -E`; GNU: `sed -r`
/usr/bin/curl -Ss -u $TWITTER_BEECH_USER:$TWITTER_BEECH_PASS -d status="$1" http://twitter.com/statuses/update.xml | grep 'error' | sed 's/<[^>]+>//g'
You can’t perform that action at this time.