Skip to content

Instantly share code, notes, and snippets.

View lukin0110's full-sized avatar
💭
Busy setting my status

Maarten Huijsmans lukin0110

💭
Busy setting my status
View GitHub Profile
@lukin0110
lukin0110 / bom.sh
Created May 22, 2013 22:17
Remove the bom character
# vim file.xml
:set nobomb
:wq
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
@lukin0110
lukin0110 / .profile
Created February 18, 2013 13:06
Config for virtualenvwrapper
source /usr/local/bin/virtualenvwrapper.sh
export VIRTUAL_ENV_DISABLE_PROMPT=1
export WORKON_HOME=$HOME/env
export VIRTUALENVWRAPPER_LOG_DIR="$WORKON_HOME"
export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME"
@lukin0110
lukin0110 / .bash_aliases.sh
Last active December 13, 2015 18:08
Bash aliases
# Some handy aliases
alias subl='sublime-text-2'
# http://stackoverflow.com/questions/5130968/how-can-i-copy-the-output-of-a-command-directly-into-my-clipboard
clipboard() { cat $1 | xclip -selection clipboard; printf "Harr harr, clipped!\nPaste with ctrl+v ...\n"; }
alias clip=clipboard
alias distro='printf "Shebang: ";uname -a;printf "\nArchitecture: ";uname -m; printf "\n"; lsb_release -a;printf "\n";'
#!/bin/sh
#
# Custom Git merge driver - merges PO files using msgcat(1)
#
# - Install gettext
#
# - Place this script in your PATH
#
# - Add this to your .git/config :
#
@lukin0110
lukin0110 / nicelog
Created February 8, 2013 08:45
git nicelog, add this snippet to your .gitconfig file
nicelog = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
http://lh.2xlibre.net/locale/fr_BE/
http://framework.zend.com/manual/1.12/en/zend.locale.appendix.html
http://www.localeplanet.com/icu/fr-BE/index.html
"fields": {
"rule_few": "",
"code_aliases": " fr-BE fr-be fr_be ",
"code": "fr_BE",
"name": "French (Belgium)",
"description": "",
@lukin0110
lukin0110 / gist:4586392
Created January 21, 2013 14:20
install oracle jdk7 on ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-jdk7-installer
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
function parse_git_branch_and_add_brackets {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'
}
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
@lukin0110
lukin0110 / gist:4066223
Created November 13, 2012 15:10
MySql schema size
SELECT table_schema,
SUM(data_length+index_length)/1024/1024 AS total_mb
FROM information_schema.tables
GROUP BY table_schema
ORDER BY 2 DESC;