This file contains hidden or 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
#!/bin/bash | |
dbt docs generate | |
dbt docs serve & | |
DOCS_SERVER_PID=$! | |
sleep 2 | |
until $(curl --output /dev/null --silent --head --fail http://127.0.0.1:8080/); do | |
printf '.' | |
sleep 2 | |
done |
This file contains hidden or 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
import re | |
class Trie(): | |
"""Regex::Trie in Python. Creates a Trie out of a list of words. The trie can be exported to a Regex pattern. | |
The corresponding Regex should match much faster than a simple Regex union.""" | |
def __init__(self): | |
self.data = {} |
This file contains hidden or 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 phenom | |
include phenom/defs, phenom/configuration, phenom/job, phenom/log, phenom/sysutil | |
ph_library_init:extern func() | |
ph_nbio_init:extern func(Int) | |
ph_sched_run:extern func() | |
/* Strings */ |
This file contains hidden or 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
export RUBY_CONFIGURE_OPTS="\ | |
--with-readline-dir=$(brew --prefix readline) \ | |
--with-openssl-dir=$(brew --prefix openssl) | |
--with-yaml-dir=$(brew --prefix libyaml) \ | |
--with-gdbm-dir=$(brew --prefix gdbm) \ | |
--with-libffi-dir=$(brew --prefix libffi)" | |
export GOPATH=$HOME/go | |
export EDITOR='subl' |
This file contains hidden or 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
# Case 1: raw values | |
DB[:foo].insert_sql(a:1) | |
# => "INSERT INTO \"foo\" (\"a\") VALUES (1)" | |
# Case 2: from another dataset | |
DB[:foo].insert_sql(DB[:foo].where(b:1)) | |
# => "INSERT INTO \"foo\" SELECT * FROM \"foo\" WHERE (\"b\" = 1)" | |
# Case 3: raw values with conditionals |
This file contains hidden or 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
This example inserts some rows into table films from a table tmp_films with the same column layout as films: | |
```sql | |
INSERT INTO films SELECT * FROM tmp_films WHERE date_prod < '2004-05-07'; | |
``` |
This file contains hidden or 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
> DB[:foo].where(a:1).update_sql(b:2) | |
=> "UPDATE \"foo\" SET \"b\" = 2 WHERE (\"a\" = 1)" | |
> DB[:foo].where(a:1).insert_sql(b:2) | |
=> "INSERT INTO \"foo\" (\"b\") VALUES (2)" |
This file contains hidden or 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
triggit-clj-storm.core=> (-> "a b c" .toUpperCase (.replace "A" "X") first) | |
\X | |
triggit-clj-storm.core=> (->> "a b c" .toUpperCase (.replace "A" "X") first) | |
\A |
This file contains hidden or 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
Apache Maven 3.0.4 (r1232337; 2012-01-17 00:44:56-0800) | |
Maven home: /usr/local/Cellar/maven/3.0.4/libexec | |
Java version: 1.6.0_33, vendor: Apple Inc. | |
Java home: /Library/Java/JavaVirtualMachines/1.6.0_33-b03-424.jdk/Contents/Home | |
Default locale: en_US, platform encoding: MacRoman | |
OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac" | |
[INFO] Error stacktraces are turned on. | |
[DEBUG] Reading global settings from /usr/local/Cellar/maven/3.0.4/libexec/conf/settings.xml | |
[DEBUG] Reading user settings from /Users/paul/.m2/settings.xml | |
[DEBUG] Using local repository at /Users/paul/.m2/repository |
This file contains hidden or 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
require 'formula' | |
class Emacs < Formula | |
homepage 'http://www.gnu.org/software/emacs/' | |
url 'http://ftpmirror.gnu.org/emacs/emacs-24.2.tar.bz2' | |
mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-24.2.tar.bz2' | |
sha1 '38e8fbc9573b70a123358b155cf55c274b5a56cf' | |
option "cocoa", "Build a Cocoa version of emacs" | |
option "srgb", "Enable sRGB colors in the Cocoa version of emacs" |
NewerOlder