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
package gzip; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.InputStreamReader; | |
import java.util.zip.GZIPInputStream; | |
import java.util.zip.GZIPOutputStream; | |
public class GzipTest { |
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
error like this | |
error: object file .git/objects/31/65329bb680e30595f242b7c4d8406ca63eeab0 is empty | |
fatal: loose object 3165329bb680e30595f242b7c4d8406ca63eeab0 (stored in .git/objects/31/65329bb680e30595f242b7c4d8406ca63eeab0) is corrupt | |
here you go. | |
Step 1: Make a backup of .git (in fact I do this in between every step that changes something, but with a new copy-to name, e.g. .git-old-1, .git-old-2, etc.): |
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" |
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 */ |
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
edit /etc/security/limits.conf | |
# non-root users | |
* soft nofile 40000 | |
* hard nofile 40000 | |
# root users | |
root soft nofile 40000 | |
root hard nofile 40000 |
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 |
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 |
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 |
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 |
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 |
NewerOlder