- Create old/, new/ and patched/ directories, where patched/ is an exact copy of old/
- Create a patch to be applied to patched/
- Patch patched/ * Test patched/
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
/usr/bin/mysqldump -u <username> -p<password> <my_database> | gzip > /path/to/backup/db/my_database_`date +%y_%m_%d`.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
#!/bin/sh | |
date=`date +%u` | |
/usr/bin/mongodump --directoryperdb -o /var/backups/mongo/$date |
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/bash | |
# | |
#[ -f ~/.profile ] && . ~/.profile | |
# MySQL Backup Script | |
# VER. 2.6 - http://sourceforge.net/projects/automysqlbackup/ | |
# Copyright (c) 2002-2003 [email protected] | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
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
ssh prod@server | |
cd /var/backups/mysql/someDir/ | |
tar -cjf my_bdd.sql.tar.bz2 my_bdd.sql | |
exit | |
cd /tmp | |
rsync -e ssh -avz prod@server:/var/backups/mysql/someDir/my_bdd.sql.tar.bz2 . | |
tar -xjf my_bdd.sql.tar.bz2 | |
mysql -u root -proot my_bdd < my_bdd.sql | |
rm my_bdd.sql.tar.bz2 my_bdd.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
// source : http://techxplorer.com/2010/02/05/managing-markers-with-the-same-coordinates-in-a-google-map/ | |
// get the coordinates | |
var hash = points[i].getAttribute("lat") + points[i].getAttribute("lng"); | |
hash = hash.replace(".","").replace(",", "").replace("-",""); | |
// source : http://techxplorer.com/2010/02/05/managing-markers-with-the-same-coordinates-in-a-google-map/ | |
// check to see if we've seen this hash before | |
if(coords[hash] == null) { | |
// get coordinate object | |
var latlng = new google.maps.LatLng(parseFloat(points[i].getAttribute("lat")), parseFloat(points[i].getAttribute("lng"))); | |
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
var CleanWordHTML = function ( str ) | |
{ | |
str = str.replace(/<o:p>\s*<\/o:p>/g, "") ; | |
str = str.replace(/<o:p>.*?<\/o:p>/g, " ") ; | |
str = str.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ; | |
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ; | |
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ; | |
str = str.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ; | |
str = str.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ; | |
str = str.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ; |
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
server { | |
listen 80; ## listen for ipv4 | |
server_name silex; | |
access_log /var/log/nginx/silex.access.log; | |
error_log /var/log/nginx/silex.error.log; | |
root /var/www/silex; |
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/bash | |
# source & MIT licence : http://exaviorn.com/raspiwrite/ | |
echo " ;d0KOd. .oOK0x: " | |
echo " 0xlllcoxolkolllloX " | |
echo " ;OccloddKNdxdocckc " | |
echo " .dkddkWNNMOdoxd, " | |
echo " .o:,x0....xd,ck' " | |
echo " K:xOoloOOccloocW " | |
echo " .x;N:....xO....'K;k," | |
echo " O..Nc...:XNl...:X.,X" |
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
git config remote.origin.url [email protected]:username/project_name.git |