Skip to content

Instantly share code, notes, and snippets.

View zeroeth's full-sized avatar
🤖
🐱 🤖 🐱 🤖

[0] zeroeth

🤖
🐱 🤖 🐱 🤖
View GitHub Profile
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]
@zeroeth
zeroeth / wat.rb
Created April 28, 2014 21:51
dear ruby
@undefined_variable
# => nil
@@undefined_variable
# (eval): (eval): uninitialized class variable @@undefined_variable in Object (NameError)
$undefined_variable
# => nil
undefined_variable
@zeroeth
zeroeth / .vimrc
Last active August 29, 2015 14:00
.vimrc
" Plugins used:
" https://github.com/jelera/vim-javascript-syntax
" https://github.com/nathanaelkane/vim-indent-guides
" Indentation Settings
" Hard tab by default
set tabstop=4
set shiftwidth=4
util = require "util"
xmpp = require "node-xmpp"
oscar = require 'oscar'
express = require "express"
###
The XMPP bot.
###
@zeroeth
zeroeth / es.po
Created April 18, 2014 01:23
gnu hello world po sample files
# Mensajes en español para GNU hello.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2006, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
# This file is distributed under the same license as the hello package.
# Javier Romañach <jromanac@dial.eunet.es>, 1996.
# Santiago Vila Doncel <sanvila@unex.es>, 1997-2002, 2006, 2010-2012, 2014.
#
msgid ""
msgstr ""
"Project-Id-Version: GNU hello 2.9\n"
"Report-Msgid-Bugs-To: bug-hello@gnu.org\n"
@zeroeth
zeroeth / bash_git_prompt.sh
Last active August 29, 2015 13:59
bash-git-prompt
# You can find this by searching for git bash prompts. Mine removed the unicode symbols.
# just insert it into your prompt as $(git_prompt)
# Colors for scripts
CLR="\[\033[0m\]" # unsets color to term's fg color
# regular colors
BLK="\[\033[0;30m\]" # black
RED="\[\033[0;31m\]" # red
GRN="\[\033[0;32m\]" # green

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@zeroeth
zeroeth / demo-links.txt
Created April 9, 2014 18:05
the demo scene
@zeroeth
zeroeth / project-jump.sh
Created April 3, 2014 16:22
bash project folder fun
alias ll='ls -al | grep -r "\->"'
projects() {
if [[ $# -eq 0 ]]; then
FILES=$(ls -t1 ~/Projects/ | head -10)
printf "Projects:\n"
select d in $FILES; do test -n "$d" && break; echo ">>> Invalid Selection"; done
cd ~/Projects/$d && pwd
else
cd ~/Projects/$1