Skip to content

Instantly share code, notes, and snippets.

View eliocapelati's full-sized avatar
👋
Hello world!

Elio eliocapelati

👋
Hello world!
View GitHub Profile
@eliocapelati
eliocapelati / CleanGlassfih.sh
Created September 5, 2012 19:07
ShellScript para limpar diretório de aplicativo do Glassfish no ambiente windows com cygwin
#!/bin/bash
#caso queira utilizar em ambiente unix, mudar linha abaixo para o diretório base do glassfish
BASE=/cygdrive/c/java/glassfish3
echo ":::::::::::::Parando Glassfish:::::::::::::"
cd $BASE/bin
./asadmin stop-domain
[
{ "keys": ["ctrl+alt+i"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Package Control: Install Package"} },
{ "keys": ["shift+alt+d"], "command": "set_setting", "args": {"setting": "draw_white_space","value": "all"} },
{ "keys": ["shift+alt+a"], "command": "set_setting", "args": { "setting": "draw_white_space", "value": "selection" }},
]
@eliocapelati
eliocapelati / Useful_Fix_For_web_pages
Created February 22, 2013 14:59
Useful commands to apply directives rules to files and directories on linux
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
#!/usr/bin/env bash
BOLD="\033[1m"
RED="\033[31m"
N_C="\033[0m"
usage(){
echo -e "\n\n"
echo -e "Usage:\n"
@eliocapelati
eliocapelati / renameToLower.sh
Created July 8, 2013 21:46
Rename files with any CaPiTaL word to lower case
#!/bin/bash
for foo in *; do mv $foo `echo $foo | tr /[A-Z]/ /[a-z]/` ; done
#!/bin/bash
for f in {1..100}
do
java ConcurrencyTest &
done
@eliocapelati
eliocapelati / check_restart_cntlm.sh
Last active December 22, 2015 21:19
Check if the remote proxy is down, and restart your connection.
#!/usr/bin/env bash
log(){
#See "$ man logger"
logger -i -t "CR-CNTLM" "[User:$(whoami)] $1"
}
##TODO: Impl system count of unsuccessful restarts (Redis?)
##MUST BE ROOT
@eliocapelati
eliocapelati / billion_laughs.xml
Last active December 28, 2015 21:34
Doctor Evil Feelings JAXP00010001: The parser has encountered more than "64000" entity expansions in this document; this is the limit imposed by the JDK. [1] null XML validation finished.
<?xml version="1.0"?>
<!DOCTYPE lolz [
<!ENTITY lol "lol">
<!ELEMENT lolz (#PCDATA)>
<!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;">
<!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;">
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
<!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;">
<!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;">
<!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;">
@eliocapelati
eliocapelati / 52project.rb
Created January 2, 2014 17:52
Project 52 weeks saving money
end_value = 0
(1..52).each do |value_add|
end_value+=value_add
puts "On Week #{value_add} you has accumulated #{end_value}"
end
puts "End Value : #{end_value}"
@eliocapelati
eliocapelati / .alias
Created January 5, 2016 16:05
some .dotfile
#Used to define aliases and unaliases
## _ _
## /\ | (_)
## / \ | |_ __ _ ___
## / /\ \ | | |/ _` / __|
## / ____ \| | | (_| \__ \
## /_/ \_\_|_|\__,_|___/