View gist:cf97a41d0ae4b0abb171
[[ $- != *i* ]] && return
PS1="\[$(tput bold)\]\[$(tput setaf 3)\]\t \[$(tput setaf 2)\]\w\[$(tput setaf 4)\] \\$ \[$(tput sgr0)\]"
source ~/.bin/git-completion
source ~/.bin/sagent
{ sshagent_init; ssh-add; } &> /dev/null
alias ls="ls --color=auto"
View gist:c8658987699e62ee201b
#! /bin/bash
echo "DEB Packaging Tool"
# Create a temp directory
root=`mktemp -d /tmp/pkg.XXXXX`
echo "Creating temporary directory $root"
# Reproduce the tree in the temp directory
for dir in `find deb/ -type d -print`
View clip
#!/bin/bash
# Linux version
# Use this script to pipe in/out of the clipboard
#
# Usage: someapp | clip # Pipe someapp's output into clipboard
# clip | someapp # Pipe clipboard's content into someapp
#
if command -v xclip 1>/dev/null; then
if [[ -p /dev/stdin ]] ; then
View gitconfig
[alias]
lo = log --graph --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%an) %C(blue)<%cr>%C(reset)'
st = status
co = checkout
up = pull
ci = commit
br = branch
hunt = log --diff-filter=A --
[color]
ui = true
View snake.go
package main
import (
"unicode"
)
// ToSnake convert the given string to snake case following the Golang format:
// acronyms are converted to lower-case and preceded by an underscore.
func ToSnake(in string) string {
runes := []rune(in)
View translit.sql
DROP FUNCTION IF EXISTS `translit`;
DELIMITER //
CREATE FUNCTION `translit`(`str` TEXT)
RETURNS text
LANGUAGE SQL
DETERMINISTIC
NO SQL
SQL SECURITY INVOKER
COMMENT ''
BEGIN
View nilscan.go
package sqlx
import (
"bytes"
"database/sql"
"fmt"
"reflect"
"strconv"
"strings"
)