Skip to content

Instantly share code, notes, and snippets.

@kwmiebach
kwmiebach / spacemacs-cheshe.md
Created August 25, 2017 18:37 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@kwmiebach
kwmiebach / dhl.py
Last active August 4, 2017 12:01 — forked from henrik/eu_country_codes.rb
European ISO country codes for DHL (except germany)
# Diese Liste enthaelt laender doppelt mit teils abeichenden ISO Codes
EU_AUSLAND_CODES_DHL = [
"AT",
"BE",
"BG",
"CY",
"CZ",
"DK",
"EE",
"ES",
@kwmiebach
kwmiebach / erlang-and-elixir-install-with-kiex-on-fedora19.md
Last active June 26, 2017 11:16 — forked from taylor/erlang-and-elixir-install-with-kiex-on-fedora19.md
Installing Erlang with kerl and Elixir with kiex on Fedora 19

Install basic dev env tools/libs

yum install -y vim-enhanced tmux
yum groupinstall 'Development Tools' -y
yum install -y ncurses-devel ncurses

Setup kerl

@kwmiebach
kwmiebach / ContentMD5.pm
Last active May 6, 2017 10:02 — forked from sivel/ContentMD5-ReqDotMD5.pm
NGINX Perl Module to Output Content-MD5 HTTP Header
# nginx Embedded Perl module for adding a Content-MD5 HTTP header
#
# THIS VERSION GENERATES A BASE64 ENCODED VALUE AS REQUIRED BY RFC1864
#
# This perl module, will output an MD5 of a requested file using the
# Content-MD5 HTTP header, calculating the MD5 BASE64 hash on the fly.
#
# Author: Matt Martz <matt@sivel.net>
# Link to the original version: https://gist.github.com/sivel/1870822
# This version, with modifications:
NOTE: "In Spacemacs, M-m _is_ SPC by default"
NOTE: "M-m and SPC can be used interchangeably".
NOTE: ??? are keys I don't know which I want to know
## Custom mappings: my own mappings which require configuration in .spacemacs
* Dumb Jump - 'gd'
## Day to day
* Get NeoTree prompt - 'SPC p t'
* 'C-o' - jump back
@kwmiebach
kwmiebach / alertsms.py
Last active August 29, 2015 14:24 — forked from uid0/alertsms.py
#!/usr/bin/env python
from twilio.rest import TwilioRestClient
import getopt, sys
def usage():
print "Usage Instructions for alertsms.py"
print " -h --help: Shows this text, exits"
print " -o --output [number]: sends SMS to that number"
print " -v: enables verbose output"
print " -i --input [message]: message to send"
@kwmiebach
kwmiebach / introrx.md
Last active August 29, 2015 14:24 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

% Andrea Leopardi's list parser
% http://andrealeopardi.com/posts/tokenizing-and-parsing-in-elixir-using-leex-and-yecc/
Nonterminals list elems elem.
Terminals '[' ']' ',' int atom.
Rootsymbol list.
list -> '[' ']' : [].
list -> '[' elems ']' : '$2'.
elems -> elem : ['$1'].
@kwmiebach
kwmiebach / pytest.md
Last active May 30, 2024 10:29 — forked from amatellanes/pytest.sh
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
# With absolute date ISO style:
# git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci)%C(bold blue)<%an>%Creset' --abbrev-commit"
# usage:
# $ git lg
# redirect to file: