Skip to content

Instantly share code, notes, and snippets.

View justinbaker999's full-sized avatar

Justin Baker justinbaker999

View GitHub Profile
@justinbaker999
justinbaker999 / evil.rb
Created November 17, 2014 18:24
evil programmer fiend.. usage ruby evil.rb <filetoreplace>
s=IO.read(ARGV[0]);File.write(ARGV[0], s.gsub(";","\u037E"))
@justinbaker999
justinbaker999 / csvexport.sh
Last active May 11, 2017 20:44
Export a query from postgres as CSV
#! /usr/bin/env bash
# export a query as a csv
# $1 DB name
# $2 query ex: "SELECT * from tablename"
# $3 output file, ex: output.csv
#
# ./csvexport.sh users "SELECT * from users" users.csv
#
psql -d $1 -P format=unaligned -P tuples_only -P fieldsep=\, -c "$2" > $3
[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]([][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+([]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]
# !/bin/bash
# $__ $___
# Fizz Buzz
C=0;__=Fizz;___=Buzz;until [ $C -gt 100 ]; do if [ $(( $C % 5 )) -eq 0 ] && [ $(( $C % 3 )) -eq 0 ]; then a="$__$___";elif [ $(( $C % 3 )) -eq 0 ]; then a=$___;elif [ $(( $C % 5 )) -eq 0 ]; then a=$__;else a=$C; fi; let C+=1; echo "$a"; done
@justinbaker999
justinbaker999 / b99.js
Last active February 17, 2019 15:12
99 bottles of beer 😜
if(!global.atob) {global.atob = function (str) {return Buffer.from(str, 'base64').toString();}}
const e = (j,...b) => eval("("+atob(j) + ")(" + b+")")
const beer="KGIpID0+IHsKICBmb3IgKGxldCBpID0gYiA7IGkgPiAwIDsgaS0tKSB7CiAgICBsZXQgaiA9IGkgLSAxOwogICAgbGV0IGljYXNlID0gaSAhPSAxID8gImJvdHRsZXMiIDogImJvdHRsZSI7CiAgICBsZXQgamNhc2UgPSBqICE9IDEgPyAiYm90dGxlcyIgOiAiYm90dGxlIjsKICAgIGNvbnNvbGUubG9nKGkgKyAiICIgKyBpY2FzZSArICIgb2YgYmVlciBvbiB0aGUgd2FsbCwiKTsKICAgIGNvbnNvbGUubG9nKGkgKyAiICIgKyBpY2FzZSArICIgb2YgYmVlciwiKTsKICAgIGNvbnNvbGUubG9nKCJUYWtlIDEgZG93biwgcGFzcyBpdCBhcm91bmQsIik7CiAgICBjb25zb2xlLmxvZyhqICE9IDAgPyBqICsgIiAiICsgamNhc2UgKyAiIG9mIGJlZXIgb24gdGhlIHdhbGwuIiA6ICJObyBtb3JlIGJvdHRsZXMgb2YgYmVlciBvbiB0aGUgd2FsbCIpCiAgICBjb25zb2xlLmxvZygpCiAgfQp9";
e(beer, 99);