View ubuntu - daily backup setup.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. /usr/local/bin/mybackup.sh | |
#!/bin/bash | |
# | |
# couchdb Backup Script | |
# VER. 0.1 | |
#If it takes a while, Diamond will grab this file and send it to Graphite to graph the duration of the backup. | |
date > /tmp/backup-couchdb | |
BASEDIR="/data/couchdb" | |
BACKUPDIR="/bkp/couchdb" | |
EXCLUDES="/data/shared/my_excludes.txt" |
View distance.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
/* */ | |
/* Simple node js module to get distance between two coordinates. */ | |
/* */ | |
/* Code transformed from Chris Veness example code - please refer to his website for licensing */ | |
/* questions. */ | |
/* */ | |
/* */ | |
/* Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2011 */ | |
/* - www.movable-type.co.uk/scripts/latlong.html */ |
View temporary-email-address-domains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0-mail.com | |
0815.ru | |
0clickemail.com | |
0wnd.net | |
0wnd.org | |
10minutemail.com | |
20minutemail.com | |
2prong.com | |
30minutemail.com | |
3d-painting.com |
View redis_delete_keys_pattern.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-cli KEYS "prefix:*" | xargs redis-cli DEL |
View gist:a8c8bfafe8853515b32972160e5a00d9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE : First commit your current changes, or you will lose them. | |
Then run the following commands from the top folder of your git repo: | |
git rm -r --cached . | |
git add . | |
git commit -m "fixed untracked files" | |
source : http://stackoverflow.com/questions/11451535/gitignore-is-not-working |
View git_replace_master_with_a_branch.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sometimes accidently you switched to a branch and working on it | |
// and forgot to merge with master for a long long time | |
// now it would be really difficult to merge with master | |
// this will basically replace master with a branch | |
// say, you have a master and a branch named "branch1" | |
git checkout branch1 | |
git merge -s ours master | |
git checkout master | |
git merge branch1 |
View readme.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//command line | |
diskpart | |
//diskpart command line | |
list disk | |
//it will show disk | |
// disk0, 1, 2 | |
select disk 2 | |
clean |
View updateFavicon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function updateFavicon(faviconURL) { | |
var src = faviconURL; | |
var head_node = document.head || document.getElementsByTagName('head')[0]; | |
var link = document.createElement('link'), | |
oldLink = document.getElementById('favicon'); | |
link.id = 'favicon'; | |
link.rel = 'shortcut icon'; | |
link.href = src; | |
if (oldLink) { | |
head_node.removeChild(oldLink); |
View includeCSS.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function includeCSSfile(href) { | |
var head_node = document.head || document.getElementsByTagName('head')[0]; | |
var link_tag = document.createElement('link'); | |
link_tag.setAttribute('rel', 'stylesheet'); | |
link_tag.setAttribute('type', 'text/css'); | |
link_tag.setAttribute('href', href); | |
head_node.appendChild(link_tag); | |
} |
View gist:50da5b708b7c7470762c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//command line | |
diskpart | |
//diskpart command line | |
list disk | |
//it will show disk | |
// disk0, 1, 2 | |
select disk 2 | |
clean |
NewerOlder