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 / 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 / .alias
Created January 5, 2016 16:05
some .dotfile
#Used to define aliases and unaliases
## _ _
## /\ | (_)
## / \ | |_ __ _ ___
## / /\ \ | | |/ _` / __|
## / ____ \| | | (_| \__ \
## /_/ \_\_|_|\__,_|___/
'''
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:
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());
@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:
#
[
{
"adminregion": {
"id": "",
"value": ""
},
"capitalCity": "Oranjestad",
"id": "ABW",
"incomeLevel": {
"id": "HIC",
import json
import psycopg2
from pprint import pprint
def main():
sql_insert = """INSERT INTO
worldbank_countries(countries)
VALUES (%s);"""
CREATE TABLE worldbank_countries(
countries jsonb
);
@eliocapelati
eliocapelati / dynamo_json_to_csv.py
Created April 25, 2017 19:28
Convert a dynamodb result [json] to csv
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
__author__ = "Elio Capelati Jr"
__version__ = "1.0.0"
import csv, json, sys, argparse
from pprint import pprint

Keybase proof

I hereby claim:

  • I am eliocapelati on github.
  • I am eliocapelati (https://keybase.io/eliocapelati) on keybase.
  • I have a public key ASDI8j5jFL4jcyVJ5TSGtjUK3lbzIMJedXNtfNUlqgb3jgo

To claim this, I am signing this object: