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
| /** | |
| * Bookmarklet que pega o texto selecionado no browser | |
| * e abre uma nova aba com uma busca no IMDB | |
| * | |
| * SITE PARA CRIAR O BOOKMARKLET | |
| * @link http://mrcoles.com/bookmarklet/ | |
| */ | |
| var s = window.getSelection(); | |
| if(s.rangeCount) { |
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
| #!/bin/bash | |
| killall iTunes | |
| osascript -e "tell application \"iTunes\" to open" |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Verifica Scroll</title> | |
| <meta charset="UTF-8" /> | |
| <style type="text/css"> | |
| #lista { | |
| overflow: scroll; | |
| width: 100%; | |
| height: 100px; |
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
| #!/usr/bin/php | |
| <?php | |
| for($x=0; $x<10; $x++) { | |
| echo "\033[2J\n"; | |
| echo "X: " . $x . "\n"; | |
| echo "+1: " . ($x+1) . "\n"; | |
| echo "+2: " . ($x+2) . "\n"; | |
| echo "+3: " . ($x+3) . "\n"; | |
| echo "+4: " . ($x+4) . "\n"; |
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
| # http://ascii-table.com/ansi-escape-sequences.php | |
| # limpa tela | |
| echo -n -e "\033[2J" |
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
| #!/usr/bin/php | |
| <?php | |
| $cor_reset = "\033[0m"; | |
| $cor_texto = array(); | |
| $cor_texto['black'] = "\033[0;30m"; | |
| $cor_texto['dark_gray'] = "\033[1;30m"; | |
| $cor_texto['blue'] = "\033[0;34m"; | |
| $cor_texto['light_blue'] = "\033[1;34m"; |
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
| #!/usr/bin/php | |
| <?php | |
| $total = 20; | |
| $x = 0; | |
| while($x<=$total) { | |
| $progresso = str_repeat("#", $x); | |
| echo "\r[{$progresso}] ({$x} de {$total})"; | |
| flush(); | |
| $x++; | |
| sleep(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
| #!/usr/bin/php | |
| <?php | |
| echo "Tem certeza que deseja continuar? Digite 'sim' para continuar: "; | |
| $handle = fopen ("php://stdin","r"); | |
| $line = fgets($handle); | |
| if(trim($line) != 'sim'){ | |
| echo "OPERACAO CANCELADA!\n"; | |
| exit; | |
| } | |
| echo "Ok. Obrigado por continuar... Nada foi executado.\n"; |
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
| osascript -e "tell application \"Terminal\" to activate" |
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 | |
| $remoteFile = "ftp://host.com/caminho/do/arquivo.zip"; | |
| $localFile = "/caminho/do/arquivo-local.zip"; | |
| $fo = fopen($localFile, 'a'); | |
| $curl = curl_init(); | |
| curl_setopt($curl, CURLOPT_URL, $remoteFile); #input | |
| curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($curl, CURLOPT_FILE, $fo); #output | |
| curl_setopt($curl, CURLOPT_USERPWD, "usuario:Senh@!"); |