Skip to content

Instantly share code, notes, and snippets.

@jerryq27
jerryq27 / wtf.js
Last active April 29, 2019 18:47 — forked from MichalZalecki/wtf.js
For presentation.
'2' == 2
'2' === 2
[] + []
[] == []
typeof []
typeof null
null instanceof Object
#!/bin/bash
# Original script: https://gist.github.com/togume/83b4bf40e1528742374bbce338270f34
TABLES=$(mdb-tables -1 "$1")
IFS=$'\n' # Internal Field Separator: for loops use spaces to separate input by default, this changes that default value to new lines.
for t in $TABLES
do
# Surround the names in backticks so the spaces are ignored.
echo "DROP TABLE IF EXISTS \`$t\`;"