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
\n newline | |
\r carriage return | |
< less-than character. | |
> greater-than character. | |
& ampersand character. | |
%% a percent sign | |
%b file size of image read in | |
%c comment meta-data property | |
%d directory component of path | |
%e filename extension or suffix |
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
#!/bin/bash | |
DOMAIN=$1 | |
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --domains $DOMAIN --no-parent --background $DOMAIN |
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
apt-get install apache2 php5 libapache2-mod-php5 | |
apt-get install mysql-server mysql-client php5-mysql | |
apt-get install php5-xcache | |
apt-get install php5-imagick | |
apt-get install phpmyadmin |
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 { | |
listen 80; | |
server_name localhost; | |
root /var/www; | |
client_max_body_size 32M; | |
location = /clear.gif { | |
empty_gif; | |
expires max; |
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
<?php | |
$now = time(); | |
$curMonth = date('n'); | |
$curYear = date('Y'); | |
if ($curMonth == 12) { | |
$currentMonthEnds = mktime(0, 0, 0, 1, 1, $curYear+1); | |
} else { |
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 dpkg --clear-selections | |
sudo dpkg --set-selections < ~/listPackages.txt | |
sudo apt-get autoremove |
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
jQuery().jquery; |
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 allowDrop(ev) { | |
ev.preventDefault(); | |
} | |
function drag(ev) { | |
ev.dataTransfer.setData("Text",ev.target.id); | |
} | |
function drop(ev) { | |
ev.preventDefault(); |
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
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit" |
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
// ref .: http://stackoverflow.com/questions/15287865/remove-array-element-based-on-object-property | |
myArray = myArray.filter(function( obj ) { | |
return obj.field !== 'money'; | |
}); |