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
| /var/log/nginx/*.log { | |
| daily | |
| missingok | |
| rotate 7 | |
| compress | |
| delaycompress | |
| notifempty | |
| create 640 root adm | |
| sharedscripts | |
| postrotate |
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
| user www-data; | |
| worker_processes 8; | |
| worker_rlimit_nofile 32768; | |
| error_log /var/log/nginx/error.log; | |
| events { | |
| worker_connections 512; | |
| use epoll; |
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 | |
| $pages = 554; | |
| $data = array(); | |
| $doc = new DOMDocument; | |
| libxml_use_internal_errors(true); | |
| for ($page = 1; $page <= $pages; $page++){ | |
| echo "Carregando página: $page" . PHP_EOL; | |
| $body = file_get_contents("http://transparencia.to.gov.br/pessoal/?opt=3&n=&o=&p={$page}"); | |
| $body = utf8_encode(utf8_decode($body)); | |
| $doc->loadHTML($body); |
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
| var characterData = [ | |
| { | |
| 'class' : 'Great Weapon Fighter', | |
| 'skills' : [ | |
| { | |
| name: 'Reaping Strike', | |
| type: 'atwill', | |
| description: 'Hold the button to prepare a powerful sweeping strike that grows in strength the longer you charge it up. While charging your swing, you gain more Determination from taking damage.', |
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 | |
| if ($argc < 2) { | |
| die ('Use textsplit.php /path/do/arquivo linhas'); | |
| } | |
| if (!isset($argv[2])) { | |
| $argv[2] = 1000; | |
| } |
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 | |
| class Controller | |
| { | |
| public function indexAction() | |
| { | |
| $repo = $this->getRepository('User'); |
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 | |
| // PHP >= 5.3 | |
| // resposta: https://www.facebook.com/groups/nao.tem.biscoito/permalink/10153102397605160/ | |
| $required = 282261; | |
| $itens = array_filter($seuArray, function($item) use ($required) { | |
| return $item[0] == $required; | |
| }); |
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 | |
| // resposta: https://www.facebook.com/groups/nao.tem.biscoito/permalink/10153103467920160/ | |
| $cpf = preg_replace('@^(\d{3})(\d{3})(\d{3})(\d{2})$@', '$1.$2.$3-$4', '12345678900'); | |
| echo $cpf; |
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
| { | |
| "meta": { | |
| "code": 200 | |
| }, | |
| "notifications": [ | |
| { | |
| "type": "notificationTray", | |
| "item": { | |
| "unreadCount": 16 | |
| } |
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 | |
| $cpfs = array( | |
| '123.456.789-09', | |
| '2.3.4.4.6.8.2.7.3.4.6', | |
| '528.462.34.278', | |
| '23131378912' | |
| ); | |
| foreach ($cpfs as $cpf) { |