Skip to content

Instantly share code, notes, and snippets.

View cyaconi's full-sized avatar

Carlos Yaconi H. cyaconi

View GitHub Profile
@alegomes
alegomes / iconv
Created May 27, 2012 00:28
Converting unknown charset file to UTF-8
I had a dataset but it was not UTF-8. So, I had to find out which charset was being used. 'file' command didn't helped me out.
$ file file_name.csv
file_name.csv: Non-ISO extended-ASCII C++ program text, with very long lines, with CRLF line terminators
So, I made this bash script to figure out its encoding:
First, I converted the file to every single format available by 'iconv':
$ for f in $(iconv -l); do echo "Convertendo $f ..."; iconv -f $f -t UTF-8 < file_name.csv > fil_name.$f.csv; done
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#