Skip to content

Instantly share code, notes, and snippets.

View 7kfpun's full-sized avatar
🦊

kf 7kfpun

🦊
View GitHub Profile
@7kfpun
7kfpun / gist:147b4ec69073ccab72f4
Created January 21, 2015 05:41
Git - Pushing code to multi remotes
git remote set-url --add --push origin git://one/repo.git
git remote set-url --add --push origin git://another_one/repo.git
@7kfpun
7kfpun / gist:5eb68a574e4d830047e5
Last active August 29, 2015 14:16
Rename committer
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = GIT_AUTHOR_EMAIL ];
then
GIT_AUTHOR_NAME="kf";
GIT_COMMITTER_NAME="kf";
GIT_AUTHOR_EMAIL="7kfpun@gmail.com";
GIT_COMMITTER_EMAIL="7kfpun@gmail.com";
git commit-tree "$@";
else
git commit-tree "$@";
@7kfpun
7kfpun / gist:6d588acef363749daefa
Last active August 29, 2015 14:16
install nodejs
wget http://nodejs.org/dist/v0.12.0/node-v0.12.0.tar.gz
tar -zxf node-v0.12.0.tar.gz
cd node-v0.12.0
./configure && make && sudo make install
curl -L https://npmjs.com/install.sh | sh
http://askubuntu.com/questions/519696/twofinger-scroll-on-lenovo-g50
@7kfpun
7kfpun / gist:008f35a59cd28fbd172f
Created March 12, 2015 06:25
How to Shrink a Git Repository
http://stevelorek.com/how-to-shrink-a-git-repository.html
BeautifulSoup
Celery
Django
Jinja2
Pil
Pillow
PyJWT
PyYAML
Pygments
Sharpy
while true;do clear;date;sleep 1;done
# OR #
while true;do clear;date +"%r";sleep 1;done
Installation
------------
# sudo apt-get install ntp
Configuration
-------------
Edit /etc/ntp.conf and reload by `sudo service ntp reload`
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
@7kfpun
7kfpun / gist:a8d1326db44aa7857660
Created June 25, 2015 10:09
Remove the X-Requested-With header from ajax requests
http://stackoverflow.com/questions/3372962/can-i-remove-the-x-requested-with-header-from-ajax-requests
jQuery.ajax({
url: yourAjaxUrl,
// 'xhr' option overrides jQuery's default
// factory for the XMLHttpRequest object.
// Use either in global settings or individual call as shown here.
xhr: function() {