Skip to content

Instantly share code, notes, and snippets.

View kwmiebach's full-sized avatar

kwmiebach kwmiebach

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/bin/bash
#
# /etc/init.d/chicagoboss
#
# Starts Chicago Boss from the /home/boss/myapp directory.
#
# https://gist.github.com/kwmiebach/1230fddf665b50323471
# Source function library.
# . /etc/init.d/functions
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:
@kwmiebach
kwmiebach / pytest.md
Last active June 4, 2024 06: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:

% 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 / 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.

@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"
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 / 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:
@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