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
find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' |
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
# Utilities alias | |
alias vi="vim" | |
alias ack="ack-grep" | |
alias phpunit="phpunit --colors" | |
alias ll="ls -al" | |
alias fuck='sudo $(history -p \!\!)' |
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 core.filemode false |
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
<!DOCTYPE html> | |
<title>Testing query selectors</title> | |
<ul id="fruits"> | |
<li>Banana</li> | |
<li>Peach</li> | |
<li>Lemon</li> | |
<li>Pineapple</li> | |
</ul> | |
<script> | |
$("#fruits li:nth-child(3)").css("color", "green"); |
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 service smbd restart | |
sudo service nmbd restart |
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 -a | |
$p = new Phar('/path/to/phar'); | |
$p->extractTo('/my-uncompressed-phar'); |
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 branch --merged | grep -v "\*" | xargs -n 1 git branch -d |
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
-- Decoding | |
SELECT CONVERT_FROM(DECODE(field, 'BASE64'), 'UTF-8') FROM table; | |
-- Encoding | |
SELECT ENCODE(CONVERT_TO(field, 'UTF-8'), 'base64') FROM table; |
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
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/ | |
sudo ln -s /usr/local/bin/composer.phar /usr/local/bin/composer |
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
# Install PostGreSQL | |
sudo apt-get install postgresql | |
# Create user | |
sudo -i -u postgres | |
psql | |
CREATE USER username; | |
ALTER ROLE username WITH CREATEDB; | |
# Create database |