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
find somedir -type f -exec md5sum {} \; | sort -k 34 | md5sum |
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
wget -r --no-parent -A '*.tar.gz' http://www.example.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
/****************************************************************************** | |
How to load Javascript modules into postgres | |
******************************************************************************/ | |
CREATE EXTENSION IF NOT EXISTS plv8 | |
/****************************************************************************** | |
First step is download the Javascript module file | |
Example with undescore-min and node-jpath | |
******************************************************************************/ |
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
$ rsync --partial --progress -av --rsh=ssh local_file username@example.com:~/ | |
$ rsync --partial --progress -av --rsh=ssh username@example.com:~/remoteFolder/ ./localFolder/ | |
Or shorter version | |
$ rsync -av -P -e ssh SRC DEST | |
If ssh is on a non default port: |
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
Date.prototype.prettyPrint = function () { | |
return ['Jan.', 'Feb.', 'Mar.', | |
'Apr.', 'May', 'Jun.', | |
'Jul.', 'Aug.', 'Sep.', | |
'Oct.', 'Nov.', 'Dec.'][this.getMonth()] + " " + | |
(function (d) { | |
var s = d.toString(), l = s[s.length-1]; | |
return s+(['st','nd','rd'][l-1] || 'th'); | |
})(this.getDate()) + ", " + | |
this.getFullYear() + " " + |
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
CREATE EXTENSION tablefunc; | |
CREATE TABLE sales(year int, month int, qty int); | |
INSERT INTO sales VALUES(2007, 1, 1000); | |
INSERT INTO sales VALUES(2007, 2, 1500); | |
INSERT INTO sales VALUES(2007, 7, 500); | |
INSERT INTO sales VALUES(2007, 11, 1500); | |
INSERT INTO sales VALUES(2007, 12, 2000); | |
INSERT INTO sales VALUES(2008, 1, 1000); | |
INSERT INTO sales VALUES(2009, 5, 2500); |
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
#! /bin/sh | |
# chkconfig: 2345 98 02 | |
# description: PostgreSQL RDBMS | |
# File adjusted based on PGSRC/contrib/start-scripts/linux | |
# This is an example of a start/stop script for SysV-style init, such | |
# as is used on Linux systems. You should edit some of the variables | |
# and maybe the 'echo' commands. | |
# |
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
[user] | |
name = Thalis Kalfigkopoulos | |
email = foo@bar.com | |
[push] | |
default = simple | |
[diff] | |
external = /home/tkalfigo/.git_meld_diff.js | |
[color] | |
branch = auto | |
diff = auto |
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
#!/usr/bin/env node | |
var exec = require('child_process').exec; | |
function cb(error, stdout, stderr) { | |
if (error !== null) { | |
console.log('exec error: ' + error); | |
} | |
} | |
exec('/usr/bin/meld ' + process.argv[3] + ' ' + process.argv[2] , cb); |
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
export PS1="\[\e]0;\u@\h:\w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$(__git_ps1)\$ " |
OlderNewer