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 | |
// Exemplo de Message Queue nativo em PHP | |
// Veja a documentação sobre "Funções Semáforo" : http://php.net/manual/pt_BR/ref.sem.php | |
define('__ID__', 59544); | |
// Definimos um ID para a Fila |
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/python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
def open_url(url): | |
return urllib2.urlopen(url).read() | |
if __name__ == '__main__': |
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 middle() { | |
var numbers = Array.prototype.slice.call(arguments); | |
if (numbers.length % 2 == 0) throw Error("The number of parameters should be odd"); | |
var min, max; | |
while (numbers.length > 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Countdown Test</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> | |
<script src="wm-countdown.js"></script> |
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
<snippet> | |
<content><![CDATA[ | |
<link rel="icon" type="image/png" href="$1"> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>favicon</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>text.html</scope> | |
</snippet> |
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 | |
/** | |
* Debug a expression/variable on shutdown with html comment | |
* | |
* @param ...$args | |
* @return void | |
* */ | |
function quiet_debug() | |
{ |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import re | |
class NotMatchingException(Exception): | |
pass | |
""" | |
This class represente a route | |
""" |
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
angular.module('ui.bootstrap.dialogs', ['ui.bootstrap']) | |
.factory('$dialogConfirm', function ($uibModal) { | |
return function (message, title) { | |
var modal = $uibModal.open({ | |
size: 'sm', | |
template: '<div class="modal-header">\ | |
<h4 class="modal-title" ng-bind="title"></h4>\ |
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 | |
/** | |
* Simplify the Trace of an exception. Object references are converted to class string name. | |
* | |
* @param Exception|Throwable $e | |
* @throws \InvalidArgumentException | |
* @return array | |
* */ |
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
Que isso, jovem. PHP é um adicente que virou linguagem. | |
Sabe, acho curioso o rumo que Node tomou, servindo de facilitador pra pacotes JS, que, olhem só, justamente pra resolver comportamento de cliente. | |
Sou um cara com uma cabeça velha. Fora de moda. Não gosto de Node. Não gosto de JS. | |
Eu detesto o Node pro que ele se propôs no começo. Ser um servidor JS. | |
Ainda que a pobreza extrema do mundo acabe em 15 anos, ainda que logo tenha cura pra câncer, AIDS, etc., aparece aí o PHP, o Node e o Estado Islâmico pra provar que nem tudo são flores. | |
Node.js é tudo, menos JS |