Skip to content

Instantly share code, notes, and snippets.

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

Elio eliocapelati

👋
Hello world!
View GitHub Profile
[
{
"adminregion": {
"id": "",
"value": ""
},
"capitalCity": "Oranjestad",
"id": "ABW",
"incomeLevel": {
"id": "HIC",
@eliocapelati
eliocapelati / .functions
Last active December 27, 2016 16:49
DotFiles
#######################################
# Custom functions available from shell
#######################################
#######################################
# Creates a asciidoc file based on SonarQube rule alias
# For example:
#
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
public static void main(String ... args){
PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
System.out.println("Number of print services: " + printServices.length);
for (PrintService printer : printServices)
System.out.println("Printer: " + printer.getName());
'''
wls:/offline> help('createDomain')
Description:
Creates a domain using the specified template. In the event of an
error, the command returns a WLSTException.
Note the following:
@eliocapelati
eliocapelati / .alias
Created January 5, 2016 16:05
some .dotfile
#Used to define aliases and unaliases
## _ _
## /\ | (_)
## / \ | |_ __ _ ___
## / /\ \ | | |/ _` / __|
## / ____ \| | | (_| \__ \
## /_/ \_\_|_|\__,_|___/
@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 / 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
#!/usr/bin/env bash
BOLD="\033[1m"
RED="\033[31m"
N_C="\033[0m"
usage(){
echo -e "\n\n"
echo -e "Usage:\n"
[
{ "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" }},
]
#!/usr/bin/env bash
CONVERSION="USDBRL"
#Yahoo YQL console: https://developer.yahoo.com/yql/console/
PARAM1="q=select * from yahoo.finance.xchange where pair in (%22$CONVERSION%22)&env=store://datatables.org/alltableswithkeys"
FORMAT="json" #XML store about 405b | JSON store about 202b
PARAM2="format=$FORMAT"
URL="http://query.yahooapis.com/v1/public/yql"
SAVEPATH="~/currencies/"
INTERVAL=1