Skip to content

Instantly share code, notes, and snippets.

@cyriac
cyriac / rsync_simple.sh
Created August 18, 2014 17:50
A useful rsync between folders
rsync -pvr --delete --exclude-from=file_with_excludes folder1/ userB@hostB:folder2/
@cyriac
cyriac / list_of_dict_to_csv
Created August 11, 2014 06:26
Python snippet to convert list of homogenous dict to csv
import csv
list_of_dict = [.....]
keys = list_of_dict[0].keys()
f = open('file.csv', 'wb')
dict_writer = csv.DictWriter(f, keys)
dict_writer.writer.writerow(keys)
dict_writer.writerows(list_of_dict)
.findhere.com
.freeservers.com
.zzn.com
0-mail.com
001.igg.biz
0039.cf
0039.ga
0039.gq
0039.ml
00b2bcr51qv59xst2.cf
@cyriac
cyriac / gitlab-backup.cron
Created May 23, 2014 20:15
Gitlab backup to Amazon S3
0 2 * * * cd /home/git/gitlab && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:create RAILS_ENV=production
0 4 * * * s3cmd sync --skip-existing --delete-removed /home/git/gitlab/tmp/backups/ s3://<backup-bucket-name>/gitlab/
@cyriac
cyriac / console.js
Created May 1, 2014 10:32
Handling console log messages on old browsers
if (typeof console === "undefined" || typeof console.log === "undefined") {
console = {};
console.log = function() {};
}