This file contains hidden or 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
# Removes all deleted files | |
git rm $(git ls-files -d) | |
# Removes deleted files in a given directory | |
git rm $(git ls-files -d path/to/subdir/.) |
This file contains hidden or 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
mysqldump -udb_user -p db_name | sed -e 's/olddomain.com/newdomain.com/g' > db_dump.sql |
This file contains hidden or 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
grep -rni "STRING" . |
This file contains hidden or 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 / -mount -noleaf -type f -size +10000k -print0 | xargs -0 ls -lhSr | awk '{printf "%*s %s\n",7,$5":",$9}' |
This file contains hidden or 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
php_value upload_max_filesize 20M | |
php_value post_max_size 20M |
This file contains hidden or 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 | |
THESITE="example.org" | |
THEDB="my_database_name" | |
THEDBUSER="my_database_user" | |
THEDBPW="my_database_password" | |
THEDATE=`date +%d%m%y%H%M` | |
mysqldump -u $THEDBUSER -p${THEDBPW} $THEDB | gzip > /var/www/vhosts/$THESITE/backups/files/dbbackup_${THEDB}_${THEDATE}.bak.gz |
This file contains hidden or 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
loadFlickr("29080075@N02"); |
This file contains hidden or 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 loadFlickr(flickrid) | |
{ | |
// Display a loading icon in our display element | |
$('#feed').html('<span><img src="/blog/images/lightbox-ico-loading.gif" alt=""></span>'); | |
// Request the JSON and process it | |
$.ajax({ | |
type:'GET', | |
url:"http://api.flickr.com/services/feeds/photos_public.gne", | |
data:"id="+flickrid+"&lang=en-us&format=json&jsoncallback=?", |
This file contains hidden or 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 loadFlickr(flickrid) | |
{ | |
// Display a loading icon in our display element | |
$('#feed').html('<span><img src="/blog/images/lightbox-ico-loading.gif" alt=""></span>'); | |
// Request the JSON and process it | |
$.ajax({ | |
type:'GET', | |
url:"http://api.flickr.com/services/feeds/photos_public.gne", | |
data:"id="+flickrid+"&lang=en-us&format=json&jsoncallback=?", |
This file contains hidden or 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
({ | |
"title": "Uploads from ennuidesign", | |
"link": "http://www.flickr.com/photos/ennuidesign/", | |
"description": "", | |
"modified": "2009-03-17T03:53:36Z", | |
"generator": "http://www.flickr.com/", | |
"items": [ | |
{ | |
"title": "This Is How You Get People to Talk About You", | |
"link": "http://www.flickr.com/photos/ennuidesign/3361269251/", |