Skip to content

Instantly share code, notes, and snippets.

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

[0] zeroeth

🤖
🐱 🤖 🐱 🤖
View GitHub Profile
@zeroeth
zeroeth / list_git_projects.sh
Created March 23, 2014 21:57
find all git repos in a folder
#!/bin/bash
# Doesn't work with white-spaced names.
# find . -type d -name .git | xargs -n 1 dirname
# Works with white-space.
find . -type d -name .git -print0 | xargs -0 -n 1 dirname
# TODO fetch all remotes and then list branch sync info similar to https://gist.github.com/zeroeth/8013177
@zeroeth
zeroeth / index.html
Last active August 29, 2015 13:57 — forked from cfergus/index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="sankey.js"></script>
<title>Sankey Diagram</title>
<style>
@zeroeth
zeroeth / index.html
Last active August 29, 2015 13:57 — forked from cfergus/index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="sankey.js"></script>
<title>Sankey Diagram</title>
<style>
@zeroeth
zeroeth / BackboneCollectionView.js
Last active August 29, 2015 13:57
backbone collection
/* Sample table of data from collection */
/* Collection Partial */
var PartialView = Backbone.View.extend(
{
template: Mustache.compile ($("#PartialTemplate").html()),
tagName: "tr",
render: function()
@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
@zeroeth
zeroeth / demo-links.txt
Created April 9, 2014 18:05
the demo scene
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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
@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"