Um simples script para homenagear as mães de todos os programadores.
A Pen by John Murowaniecki on CodePen.
This file contains 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 daysInMonth(month, year) { return new Date(year, month, 0).getDate(); } |
This file contains 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 isBissextile(n) { return n % 4 === 0 && (n % 400 === 0 || n % 100 !== 0) ? true : false; } |
This file contains 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
a=1;b=0;while [ $a -gt $b ];do s=0;for p in * ;do c=`ls $p|wc -l`; echo "$p $c jsons";s=`expr $s + $c`;done;echo -e "Total $s em `date +'%Y%m%d %H%M'`\nDiferença do anterior: `expr $s - $a`";b=$a;a=$s;sleep 60;done |
This file contains 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 | |
function csv2array($filename, array $options = array( | |
'delimiter' => ',', | |
'enclosure' => '"', | |
'escape' => "\\", | |
), $return = array()) | |
{ | |
if (file_exists($filename)) { | |
$csv = fopen($filename, 'r'); |
This file contains 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 | |
require_once __DIR__.'/../../system/azure/autoload.php'; | |
use WindowsAzure\Common\ServicesBuilder; | |
use WindowsAzure\Blob\Models\CreateContainerOptions; | |
use WindowsAzure\Blob\Models\PublicAccessType; | |
use WindowsAzure\Common\ServiceException; | |
$config = array( |
This file contains 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
/* Foca no código | |
.---. | |
/o o\ | |
__(= " =)__ | |
//\'-=-'/\\ | |
) (_ | |
/ `"=-._ | |
/ \ ``"=. |
This file contains 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 | |
# | |
# based on https://twitter.com/typeof_/status/438001208729403392 | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen%cr %Cblue%an%Creset'" |
This file contains 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
([[ $BASH != "" ]] && echo -e "\"\e[1;5C\": forward-word\n\"\e[1;5D\": backward-word">>~/.inputrc)||([[ $ZSH_NAME != "" ]] && echo "bindkey -e\nbindkey \"\\\e[1;5C\" forward-word\nbindkey \"\\\e[1;5D\" backward-word">>~/.zshrc) |