Skip to content

Instantly share code, notes, and snippets.

View eyala's full-sized avatar

Eyal Allweil eyala

View GitHub Profile
@abshingate
abshingate / userDefineLang_ApachePig.xml
Last active April 2, 2020 17:35
Apache Pig Language for Notepad++
<NotepadPlus>
<UserLang name="Apache PIG" ext="pig" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00-- 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@jdcrensh
jdcrensh / Base62.java
Last active January 28, 2024 12:25
Class to encode a string into base 62 (character set [a-zA-Z0-9]) with Java. A common use case is URL shortening.
public class Base62 {
public static final String ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
public static final int BASE = ALPHABET.length();
private Base62() {}
public static String fromBase10(int i) {
StringBuilder sb = new StringBuilder("");