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
| <?php | |
| $api = 'http://alguma-api-aqui.com.br'; | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $api); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); | |
| curl_setopt($ch, CURLOPT_TIMEOUT, 10); | |
| curl_setopt($ch, CURLOPT_HTTPHEADER, array('chave: valor')); |
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
| echo | openssl s_client -connect douglascabral.com.br:443 2>/dev/null | openssl x509 -noout -dates |
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
| // @see http://jsfiddle.net/SpYk3/C85Hs/ | |
| function disableF5(e) { if ((e.which || e.keyCode) == 116) e.preventDefault(); }; | |
| document.addEventListener('keydown', disableF5); |
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
| archlinux-keyring | |
| archlinux-wallpaper | |
| ark | |
| atom | |
| bluez | |
| bluez-utils | |
| darktable | |
| dialog | |
| dnsutils | |
| docker |
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
| Part 1 | |
| 1. Read Text File | |
| sed r text.txt | |
| 2. Find & Replace | |
| sed ‘s/UNIX/MINIX/g’ text.txt |
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
| UPDATE wp_commentmeta SET meta_value = REPLACE(meta_value, 'http://site.com.br', 'http://localhost/'); | |
| UPDATE wp_options SET option_value = REPLACE(option_value, 'http://site.com.br', 'http://localhost/'); | |
| UPDATE wp_posts SET guid = REPLACE(guid, 'http://site.com.br', 'http://localhost/'); |
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
| Allow Ping from Outside to Inside | |
| iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT | |
| iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT | |
| Allow Ping from Inside to Outside | |
| iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT | |
| iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT |
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
| function extract { | |
| if [ -z "$1" ]; then | |
| # display usage if no parameters given | |
| echo "Usage: extract ." | |
| else | |
| if [ -f $1 ] ; then | |
| # NAME=${1%.*} | |
| # mkdir $NAME && cd $NAME | |
| case $1 in | |
| *.tar.bz2) tar xvjf ../$1 ;; |
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
| mysql --host=<IP_HOST_HERE> \ | |
| --user=<USER> \ | |
| --password=<PASSWORD> \ | |
| <DATABASE> < /path/file/here.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
| { | |
| "require": { | |
| "illuminate/database": "*" | |
| } | |
| } |