Skip to content

Instantly share code, notes, and snippets.

View irae's full-sized avatar

Irae Carvalho irae

View GitHub Profile
@irae
irae / flexFix.js
Last active December 29, 2015 02:49
It's not possible to make a proper flex box / flex wrap polyfill, but this one solves one particular problem.
(function(global){
'use strict';
function flexFix() {
var list = document.querySelector('.flexFix');
if (!list) { return ;}
var items = list.children;
if (!items.length) { return ;}
var newContainer;
var perLine = 4;
var stopper = items.length % perLine + 1;
@irae
irae / .gitconfig
Last active February 14, 2020 09:52
Git Vommit -- making typos fun and refreshing
[alias]
vommit = !sh -c \"cat ~/.gitvommit\"
@irae
irae / permuta.js
Created October 11, 2012 11:57
Permutações
var chars = "AEIO",
iterations = 3,
output = [];
function iterate(given, iterationsLeft){
var i, len = chars.length;
for(i = 0; i < len; i++) {
if(given.length < iterations-1) {
iterate(given+chars[i], iterationsLeft-1);
} else {
@irae
irae / .gitconfig
Last active August 3, 2016 23:15
Iraê .gitconfig file
[alias]
st = status -sb
ci = commit -v
co = checkout
br = branch
d = diff --color-words
dt = difftool
l = log --oneline --decorate
lg = log --graph --oneline --decorate=full
ll = log --no-merges --pretty=format:%C(yellow)%h%Creset\\ %Cgreen%an%Creset\\ %Cred%d%Creset\\ %s
@irae
irae / chorme_without_sec.sh
Created May 30, 2012 18:16
Start Chrome with some options
#!/bin/bash
ps aux | egrep "Google Chrome.app" | egrep -v egrep | awk '{ print $2 }' | xargs kill -9 2> /dev/null > /dev/null
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --disable-web-security 2> /dev/null > /dev/null
@irae
irae / .jslintrc
Created May 21, 2012 19:22
my jslintrc
{
/*** Globals ***/
// To ignore any custom global variables, enable the `predef` option and list
// your variables within it.
"predef": [
"exports",
"YUITest",
"YUI",
"YUI_config",
"YAHOO",
@irae
irae / Makefile
Created May 4, 2012 17:20
Makefile minimal example
# colors
RED=\033[01;31m
GREEN=\033[01;32m
# NC = No Color
NC=\033[01;00m
default: cores
foo:
echo "1"
@irae
irae / gist:1358469
Created November 11, 2011 16:38
pyccuracy init
#!/bin/bash
python `which pyccuracy_console` \
selenium.server=localhost selenium.port=4444 \
-R false --suppresswarnings \
-A /Users/irae/code/profile/tests/pyccuracy/actions \
-P /Users/irae/code/profile/tests/pyccuracy/pages \
-H /Users/irae/code/profile/tests/pyccuracy/hooks \
-d /Users/irae/code/profile/tests/pyccuracy/acceptance \
-u http://integration.profile.yahoo.com \
@irae
irae / gist:1268082
Created October 6, 2011 17:47
Example mustache
<div class="{{type}}">
<div class="wrapper">
<ul class="list">
{{#messages}}
<li {{{itemAttrs}}}>
<span class="icon"></span>
<span>{{message}}</span>
</li>
{{/messages}}
</ul>
@irae
irae / disabling-universal.diff
Created July 29, 2011 15:03
Problems with homebrew universal binary formulas on Lion
diff --git a/Library/Formula/gnutls.rb b/Library/Formula/gnutls.rb
index 9f9b9ef..68a7716 100644
--- a/Library/Formula/gnutls.rb
+++ b/Library/Formula/gnutls.rb
@@ -16,7 +16,7 @@ class Gnutls < Formula
fails_with_llvm "Undefined symbols when linking", :build => "2326"
def install
- ENV.universal_binary # build fat so wine can use it
+ # ENV.universal_binary # build fat so wine can use it