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
Make sure you have set a root password (sudo su passwd) Depending how your ssh is installed, you usually need to edit /etc/ssh/sshd_config and change "PermitRootLogin no" to "PermitRootLogin yes" |
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
for FN in `drush --extra=--skip-column-names sql-query "SELECT filename FROM system WHERE status = 1"`; do [ ! -f $FN ] && echo "Missing $FN"; done |
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
ps ax | grep node | grep meteor | |
netstat -lpn |grep :8090 | |
pkill -9 -f nodejs | |
sudo kill -15 <PID> |
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 tar | |
tar -c public_html > backup.tar | |
Extract tar | |
tar -xvf backup.tar | |
-- | |
$ gunzip file.gz | |
$ ls file | |
Using gzip -d command: | |
$ gzip -d file.gz |
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
drush -y pm-update | |
drush pm-update --no-core |
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 seconds2human($ss) { | |
$s = $ss%60; | |
$m = floor(($ss%3600)/60); | |
$h = floor(($ss%86400)/3600); | |
$d = floor(($ss%2592000)/86400); | |
$M = floor($ss/2592000); | |
return "$M months, $d days, $h hours, $m minutes, $s seconds"; | |
} |
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
var s = 1378897200; // unix timestamp | |
var theDate = new Date(s*1000); | |
//dateString = theDate.toLocaleString(); | |
var year = theDate.getFullYear(); | |
var month = theDate.getMonth() + 1; | |
var day = theDate.getDate(); | |
var hours = theDate.getHours(); | |
var minutes = theDate.getMinutes(); | |
var seconds = theDate.getSeconds(); |
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
//This will give you a Unix timestamp (in seconds): | |
var unix = Math.round(+new Date()/1000); | |
//This will give you the milliseconds since the epoch (not Unix timestamp): | |
var milliseconds = new Date().getTime(); |
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
drush watchdog-delete -y all |
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
sudo ln -s /etc/nginx/sites-available/node1.conf /etc/nginx/sites-enabled/node1.conf |
OlderNewer