Skip to content

Instantly share code, notes, and snippets.

View danilomiranda's full-sized avatar

Danilo Cássio Gonçalves Miranda danilomiranda

View GitHub Profile
@danilomiranda
danilomiranda / index.html
Last active August 29, 2015 14:18 — forked from A973C/index.html
<div class="center-me">
<div class="equalizer"></div>
</div>
@danilomiranda
danilomiranda / main.java
Created June 11, 2015 20:44
Java mudar caracteres acentuados para não acentuados
public class Main {
public static void main(String[] args) {
final String input = "Danilo Cássio Gonçalves";
System.out.println(Normalizer.normalize(input, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", ""));
}
}
@danilomiranda
danilomiranda / splitCSV
Created June 26, 2015 18:02
Dividir arquivo CSV em arquivos menores
String charset = "Cp1252";
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream("CAMINHO ARQUIVO ORIGEM"), charset));
String line="";
String destiny="CAMINHO ARQUIVO DESTINO";
int count = 1;
int fileSize = 0;
OutputStreamWriter fos = new OutputStreamWriter(new FileOutputStream(destiny+count+".csv"),charset);
while((line = bufferedReader.readLine()) != null) {
if(fileSize + line.getBytes().length > 50 * 1024 * 1024){
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->

Keybase proof

I hereby claim:

  • I am danilomiranda on github.
  • I am danilokassio (https://keybase.io/danilokassio) on keybase.
  • I have a public key ASBY3-GhKvK3iP_OEApb7sqKSNFC7p7SYIM775Dl22Q3Rgo

To claim this, I am signing this object:

@danilomiranda
danilomiranda / atom.md
Created July 6, 2017 00:09
My default Atom packages and theme
String.format = function (format, ...args) {
return format.replace(/{(\d+)}/g, ({match, number}) => {
return typeof args[number] !== 'undefined'
? args[number]
: match;
}
);
};
@danilomiranda
danilomiranda / .zshrc
Created December 29, 2017 14:44
My .zshrc file
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"