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
#!/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 / .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";'
@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"
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
@lukin0110
lukin0110 / bom.sh
Created May 22, 2013 22:17
Remove the bom character
# vim file.xml
:set nobomb
:wq
git checkout better_branch
git merge --strategy=ours master # keep the content of this branch, but record a merge
git checkout master
git merge better_branch # fast-forward master up to the merge
<Response>
<Message>Hello, Mobile Monkey</Message>
</Response>
@lukin0110
lukin0110 / gulpfile-git-version.js
Created August 26, 2015 15:06
Gulp git version, fetches the latest git commit hash. Can be used as version for your application. Inject/replace it in your html
'use strict';
var gulp = require('gulp');
var spawn = require('child_process').spawn;
var GIT_VERSION = "na";
gulp.task('version', function(){
//git --git-dir=.git log --pretty='%ct %h' -1
//git --git-dir=.git log --pretty='%h' -1
@lukin0110
lukin0110 / mac.sh
Created September 1, 2015 12:52
Get mac address in ubuntu
#!/bin/bash
ifconfig -a eth0 | grep HWaddr | awk -F 'HWaddr ' '{print $2}'
@lukin0110
lukin0110 / GulpReactBrowserifyBabelify.md
Last active October 26, 2020 00:36
Gulp + browserify + babelify + react

Use React with Gulp, Browserify and Babelify. This allows you to use React in jsx & node.js style. It let's you use require('module') in your JavaScript. Babelify will transform the jsx code to JavaScript code.

Development

gulp build-react

This will generate a main.min.js file in the build directory with sourcemaps.

Production