I hereby claim:
- I am oliveiraev on github.
- I am oliveiraev (https://keybase.io/oliveiraev) on keybase.
- I have a public key ASC7gWebPQaXflpt5quGwBmSH_cloq_ice6D7P4TwNFxhgo
To claim this, I am signing this object:
<?php | |
/** | |
* Calcula a participação total de cada contribuinte em uma vaquinha | |
* a partir de suas contribuições iniciais | |
* | |
* @param float $total O valor total da vaquinha | |
* @param float[] $iniciais A parcela inicial de cada contribuinte | |
* @return float[] A parcela final de cada contribuinte | |
*/ |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
decode() { | |
to_decode='s:%([0-9A-Fa-f][0-9A-Fa-f]):\\x\1:g' | |
printf "%b" `echo $1 | sed 's:&:\n:g' | grep "^$2" | cut -f2 -d'=' | sed -r $to_decode` | |
} | |
data=`wget http://www.youtube.com/get_video_info?video_id=$1\&hl=pt_BR -q -O-` | |
url_encoded_fmt_stream_map=`decode $data 'url_encoded_fmt_stream_map' | cut -f1 -d','` | |
signature=`decode $url_encoded_fmt_stream_map 'sig'` | |
url=`decode $url_encoded_fmt_stream_map 'url'` | |
test $2 && name=$2 || name=`decode $data 'title' | sed 's:+: :g;s:/:-:g'` |
<?php | |
$curl = curl_init('https://www.tibia.com/community/?subtopic=killstatistics'); | |
curl_setopt_array($curl, array( | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => 'utf-8', | |
CURLOPT_FOLLOWLOCATION => true, | |
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, | |
CURLOPT_USERAGENT => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36', |
<?php | |
ini_set('date.timezone','America/Sao_Paulo'); | |
class DateFormatter extends DateTime | |
{ | |
private $parts = array( | |
array(31104000, 'ano', 'anos'), | |
array(2592000, 'mês', 'meses'), | |
array(86400, 'dia', 'dias'), |
#!/usr/bin/env /bin/bash | |
set -e | |
function writeHeader () { | |
python3 - ${1} <<EOF | |
# -*- coding: utf-8 -*- | |
import sys | |
import os |
# -*- coding: utf-8 -*- | |
u"""Imprimidor de numeral ordinal.""" | |
import sys | |
UNITS = [ | |
'', | |
'primeiro', |
" Utiliza a área de transferência do sistema | |
set clipboard=unnamed,unnamedplus | |
" Navegação por teclas direcionais | |
noremap <UP> k | |
noremap <C-UP> ( | |
noremap <RIGHT> l | |
noremap <C-RIGHT> E | |
noremap <DOWN> j | |
noremap <C-DOWN> ) |
#!/usr/bin/env node | |
/** | |
* @name JSON Prettifier | |
* @summary Given an input (filename or stdin), prints out it space-indented | |
* @license [LGPLv3]{@link https://www.gnu.org/licenses/lgpl-3.0.txt} | |
* @version 0.0.1a | |
* | |
*/ | |
(function () { | |
"use strict"; |
/** | |
* Convert Jasmine suite into parseable CasperJS test suite. | |
*/ | |
casper.parseJasmineTests = (function (casper) { | |
"use strict"; | |
/** | |
* Build a structure from Jasmine test results. | |
* | |
* Each spec generates an object with two keys: specs and tests. |