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 microtime | |
{ | |
protected $microtime; | |
public function __construct() | |
{ | |
$this->microtime = $this->calcule(); | |
} |
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
!docker | |
sudo apt-get install tasksel | |
sudo tasksel install lamp-server | |
sudo apt-get install php5-xdebug | |
sudo apt-get install kcachegrind | |
# php.ini | |
xdebug.profiler_enable = 0 | |
xdebug.profiler_enable_trigger = 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
#docker engine | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo subl /etc/apt/sources.list.d/docker.list // para ubuntu 14.04, remover tudo e adicionar: deb https://apt.dockerproject.org/repo ubuntu-trusty main | |
sudo apt-get update | |
sudo apt-get purge lxc-docker | |
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual | |
sudo apt-get update | |
sudo apt-get install docker-engine |
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 name = 'otavio'; | |
var isHomePage = function() { | |
return window.location.href.indexOf('contratar') === -1; | |
}; | |
var createAccountStepZero = function() { | |
var text = 'Qual a sequência do email? Ex.: ' + name + '[sequencia]@mailinator.com', | |
iSequence = prompt(text, getLastSequenceNumber()); |
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 jsonAccentMap = '{"à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"a","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ß":"s","ù":"u","ú":"u","û":"u","ü":"u","ÿ":"y"}'; | |
var accentRemover = function(s) { | |
var ret = ''; | |
for (var i = 0; i < s.length; i++) { | |
console.log(JSON.parse(jsonAccentMap)); | |
ret += JSON.parse(jsonAccentMap)[s.charAt(i)] || s.charAt(i); | |
} |
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() { | |
if (location.href.indexOf('gitlab.agenciasys.com/dashboard/merge_requests') < 0) { | |
return; | |
} | |
var sUser = 'otavio'; | |
$('.issues-other-filters').append('<div class="filter-item inline open-mr-filters" style="padding:7px"><a href="#" data-operand="filter">Para avaliar [Beta]</a></div>') | |
$(document).on('click', '[data-operand="filter"]', function() { |
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 | |
# Colors | |
RESET="\033[0m" | |
CY="\033[1;33m" | |
CG="\033[0;32m" | |
_verify_parameters() | |
{ | |
branch=$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
#docker engine | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' | |
sudo apt-get update | |
sudo apt-get purge lxc-docker | |
sudo apt-get install -y docker-engine | |
sudo service docker start |
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
class Api { | |
constructor(baseUrl) { | |
this.__setHash() | |
this.__setHeaders() | |
this.baseUrl = baseUrl | |
} | |
__setHash = () => { | |
this.hash = document.cookie | |
.split(';') |