Skip to content

Instantly share code, notes, and snippets.

package test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.stream.IntStream;
public class Log2vsApproxLog2 {
public class FacebookDecoder {
public static void main(String[] args) {
test("");
test("0");
test("01");
test("1001");
test("12");
test("26");
test("27");
@amalic
amalic / gist:d662adbde916639c36273d52ebf3fe39
Created October 8, 2018 09:22 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@amalic
amalic / psql-with-gzip-cheatsheet.sh
Created April 30, 2018 21:35 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database