Skip to content

Instantly share code, notes, and snippets.

View matchs's full-sized avatar

Mateus Chagas matchs

View GitHub Profile
6E6D93CC-8E0C-B4C7-D34A-70B859956929
@matchs
matchs / gist:255e5f501dfee7c01423
Created September 30, 2014 12:34
Converting files to UTF-8
for f in $(find . -not -iwholename '*.git*' -type f -exec file --mime-encoding {} \; | egrep -v "(utf-8|ascii|binary)" | awk '{print $1}' | tr -d ":"); do iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv -v $f.utf8 $f; done
@matchs
matchs / gist:feb4af7f933484e2975e
Created September 30, 2014 12:29
Converting files to UTF-8
# find all non UTF-8 files
FILES=$(find . -not -iwholename '*.git*' -not -iwholename '*.idea*' -type f -exec /usr/bin/file --mime-encoding --mime-type {} \; | grep -v utf-8 | grep text | awk '{print $1}' | tr ':' ' ')
# convert from ISO-8859-1 to UTF-8
for f in $FILES; do iconv -f iso-8859-1 -t utf-8 $f > $f-utt8 ; mv -v $f-utt8 $f; done
@matchs
matchs / id_rsa.pub
Created September 17, 2014 00:13
My Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsxOivUM5qIVPbIsLII2/yjsOd+RAp297kofP46k4fwaMjo3o2HjsmDPS1VBKXnr/CpcPe2MXpT+Fhw9wfSgk08FyzNXuSaAIIWgE970638c8TymT2v8kUDrbPB5YwYLRNXqaXODtSafzlN0pWTm0GXkF0lgl42lUbTBcsvtvZOpswY+UuRgRbEh7EqxKvaWrDOhJpiuLHeA5UkXOIuHgUjyBy7HK9PxmtK75oLSvEFnUSNA6UksOw1OfrpLgEVjFBLhhQDJpk3M1Nnl3vDMaKEzAzDdynLmWxSaM/w+M4jCDPFgmYfIIV1tIZ4kGJEbeLkPWAQVcPpoQzim0w5G5VQ== Mateus@MATEUSCHAGAS
section = {
"id" : "887yudb22ri1",
"class" : "",
"role" : "section",
paragraphs : [
]
};
@matchs
matchs / gist:10011388
Created April 6, 2014 20:57
Gist Marlon
def main():
brotherSet = []
options = {
1 : inserir,
2 : listar,
3 : procurar,
4 : deletar,
5 : editar
}
@matchs
matchs / wysihtml5-0.4.0pre.js - Auto-linking and Auto-resizing
Last active December 30, 2015 11:59
Adding auto-resizing and auto-liking to WYSIHTML5 version 0.4.0pre
/**
* @license wysihtml5 v0.4.0pre
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2012 XING AG
* Licensed under the MIT license (MIT)
*
*/
@matchs
matchs / wysihtml5-0.5.0pre.js
Created November 7, 2013 19:49
jusEditor 07/11/13
/**
* @license wysihtml5 v0.5.0pre
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2012 XING AG
* Licensed under the MIT license (MIT)
*
*/
/**
* @license wysihtml5 v0.5.0pre
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2012 XING AG
* Licensed under the MIT license (MIT)
*
*/
@matchs
matchs / wysihtml5-0.5.0pre.js
Created November 5, 2013 18:34
0.5.0pre.min
var wysihtml5 = wysihtml5 || {};
wysihtml5.assert = wysihtml5.assert || {};
/**
* Compare html strings without stumbling upon browser misbehaviors
* Uses and takes the same parameters as QUnit's equal method
*
* @example
* wysihtml5.assert.htmlEqual(
* removeAttributes('<p align="center">foo</p>'),