Clone
rtfeldman/elm-spa-example.
Download all deps: elm-package install --yes
.
Then time the builds running these commands:
rm -rf elm-stuff/build-artifacts
exports.getSQLState = function (error) { | |
return error.code || '' | |
} | |
exports.getError = function (errorType) { | |
return function (error) { | |
return { | |
errorType: errorType, | |
severity: error.severity || '', | |
code: error.code || '', |
Clone
rtfeldman/elm-spa-example.
Download all deps: elm-package install --yes
.
Then time the builds running these commands:
rm -rf elm-stuff/build-artifacts
#!/bin/sh | |
usage() { | |
echo "usage: get-workspaces.sh OUTPUT" | |
echo "" | |
echo "Print the names of workspaces on the given output" | |
echo "" | |
exit 2 | |
} |
# The SMTP server runs in a separate thread and stores sent messages in a list | |
# | |
# Usage: | |
# | |
# def test_fn(smtpd): | |
# host = smtpd.host | |
# port = smtpd.port | |
# | |
# # Run code that send email using an smtp server at host:port | |
# |
import logging, logging.config | |
TOPIC_NAME = 'TOPIC-NAME' | |
GROUP_NAME = 'GROUP-NAME' | |
BOOTSTRAP_SERVERS = ['BROKER-HOST'] | |
def setup_logging(): | |
logging.config.dictConfig({ | |
'version': 1, |
[2016-03-10 14:34:50,186] DEBUG base 14747 139872076707584 Received successful heartbeat | |
[2016-03-10 14:34:50,186] DEBUG fetcher 14747 139872076707584 Adding fetch request for partition TopicPartition(topic='TOPIC-NAME', partition=0) at offset 143454 | |
[2016-03-10 14:34:50,186] DEBUG fetcher 14747 139872076707584 Sending FetchRequest to node 1 | |
[2016-03-10 14:34:50,187] DEBUG conn 14747 139872076707584 <BrokerConnection host=SERVER-HOSTNAME port=9092> Request 975: FetchRequest(replica_id=-1, max_wait_time=500, min_bytes=1, topics=[(topic='TOPIC-NAME', partitions=[(partition=0, offset=143454, max_bytes=1048576)])]) | |
[2016-03-10 14:34:50,683] DEBUG consumer 14747 139872076707584 Sending offset-commit request with {TopicPartition(topic='TOPIC-NAME', partition=0): OffsetAndMetadata(offset=143454, metadata='')} to 1 | |
[2016-03-10 14:34:50,684] DEBUG conn 14747 139872076707584 <BrokerConnection host=SERVER-HOSTNAME port=9092> Request 976: OffsetCommitRequest_v2(consumer_group='GROUP-NAME', consumer_grou |
-- PostgreSQL | |
SELECT | |
'ALTER TABLE ' || source_tbl.relname || ' ' || | |
'DROP CONSTRAINT '|| constr.conname ||'; ' || | |
'ALTER TABLE ' || source_tbl.relname || ' ' || | |
'ADD CONSTRAINT ' || constr.conname || ' ' || | |
'FOREIGN KEY (' || source_col.attname || ') ' || | |
'REFERENCES new_table_name (primary_key_name);' | |
FROM pg_constraint constr | |
INNER JOIN pg_class target_tbl ON constr.confrelid = target_tbl.oid |
[alias] | |
st = status --short --branch | |
dc = diff --cached -M -B -C | |
typo = commit --amend | |
fixup = commit --amend --no-edit | |
logk = log --graph --pretty=\"format:%C(yellow)%h%C(red)%d%Creset %s %C(green)%an, %ar%Creset\" | |
ffpull = pull --ff-only | |
ffmerge = merge --ff-only | |
ri = "!f() { rev=$(git rev-parse $1 2>/dev/null) || rev=HEAD~$1; git rebase -i $rev; }; f" | |
rc = rebase --continue |
# Keybindings | |
unbind C-b | |
set -g prefix C-z | |
bind z send-prefix | |
bind escape copy-mode | |
bind C-z last-window | |
bind p select-pane -t :.-1 | |
bind n select-pane -t :.+1 |
# Automatically activate Git projects' virtual environments based on the | |
# directory name of the project. Virtual environment name can be overridden | |
# by placing a .venv file in the project root with a virtualenv name in it | |
function workon_cwd { | |
# Check that this is a Git repo | |
GIT_DIR=`git rev-parse --git-dir 2> /dev/null` | |
if [ $? == 0 ]; then | |
# Find the repo root and check for virtualenv name override | |
GIT_DIR=`\cd $GIT_DIR; pwd` | |
PROJECT_ROOT=`dirname "$GIT_DIR"` |