This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Used this to turn a 2-column spreadsheet to json key-value pairs | |
def traversebypairs(iterable): | |
a = iter(iterable) | |
return izip(a,a) | |
for a, b in traversebypairs(list): | |
print u'{{"{}", "{}"}},'.format(a, b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql_tzinfo_to_sql /usr/share/zoneinfo | sed -e "s/Local time zone must be set--see zic manual page/local/" | mysql -u root mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create database and user | |
CREATE DATABASE test_database; | |
CREATE USER tester WITH PASSWORD 'test_password'; | |
GRANT ALL PRIVILEGES ON DATABASE "test_database" to tester; | |
# List all users | |
\du | |
# Delete a user with existing privileges | |
DROP OWNED BY <username>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcode-select --install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future [command] |