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
function numberWithCommas(x) { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
} | |
$('.count ul li strong').each(function(){ | |
var start = parseInt($(this).text(), 10); | |
var _self = $(this); | |
setInterval(function(){ | |
var update = start++; |
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 bash | |
# Media Temple account number | |
account="XXXXXX" | |
# A list of website directories to back up | |
websites="example.com" | |
homedir="/home/$account/users/.home" |
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 -r ssh remoteuser@remotehost:/copy/from /copy/to/ |
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 bash | |
destination="/path/to/save/sql" | |
mysql_host="localhost" | |
mysql_user="readaccount" | |
mysql_pass="password" | |
databases=`mysql -h$mysql_host --user=$mysql_user -p$mysql_pass -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema)"` | |
for db in $databases; |
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
server { | |
server_name www.example.com; | |
rewrite ^ $scheme://example.com$uri permanent; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |
root /srv/www/example.com/public_html/; |
NewerOlder