Skip to content

Instantly share code, notes, and snippets.

View jmurowaniecki's full-sized avatar
🤐
************!

John Murowaniecki jmurowaniecki

🤐
************!
View GitHub Profile
@jmurowaniecki
jmurowaniecki / huia.prg
Last active September 2, 2015 20:44
HUIA Job opportunity
ANNOUNCE VagasParaProgramador
#command SAY <cColor> <cText> =>;
@ Row() + 3, 15 SAY "> " + _UTF8(<cText>) COLOR <cColor>
INIT PROCEDURE Sobre
LOCAL aHuia := {" | | | | | .----, ", " | | | | | | | ", " |___| | | | | | ", " | | | | | |-----| ", " | | `._.' | | ' "}, cText, nL := 0, cSource := "METADATA"
SET COLOR TO bg+/n
CLEAR SCREEN
@jmurowaniecki
jmurowaniecki / Homenagem-de-dia-das-mães-Encode-Web.markdown
Last active August 29, 2015 14:20
Homenagem de dia das mães Encode Web
@jmurowaniecki
jmurowaniecki / daysinmonth.js
Created January 19, 2015 21:43
Retorna quantidade de dias em dado mês
function daysInMonth(month, year) { return new Date(year, month, 0).getDate(); }
@jmurowaniecki
jmurowaniecki / isbissextile.js
Created January 19, 2015 21:43
Verifica se o ano informado é bissexto
function isBissextile(n) { return n % 4 === 0 && (n % 400 === 0 || n % 100 !== 0) ? true : false; }
@jmurowaniecki
jmurowaniecki / check files.sh
Created January 12, 2015 13:11
One liner file quantity check thanks
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
@jmurowaniecki
jmurowaniecki / csv2array.php
Last active August 29, 2015 14:08
CSV2Array and the Knights who say Ni
<?php
function csv2array($filename, array $options = array(
'delimiter' => ',',
'enclosure' => '"',
'escape' => "\\",
), $return = array())
{
if (file_exists($filename)) {
$csv = fopen($filename, 'r');
@jmurowaniecki
jmurowaniecki / WindowsAzureBlob.php
Last active August 29, 2015 14:07
Windows Azure Blob
<?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(
/* Foca no código
.---.
/o o\
__(= " =)__
//\'-=-'/\\
) (_
/ `"=-._
/ \ ``"=.
@jmurowaniecki
jmurowaniecki / git alias lg for pretty log.sh
Created June 2, 2014 17:15
Git alias lg for pretty log
#!/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'"
@jmurowaniecki
jmurowaniecki / keybinds.sh
Last active August 29, 2015 14:01
MacOS iTerm / Terminal word jump issue for ZSH and BASH
([[ $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)