Skip to content

Instantly share code, notes, and snippets.

hartzell / exons-and-their-mrnas.sql
Last active August 29, 2015 14:05
Build a table of exons that belong to more than one mRNA (exon name, {list of mRNA names}). Written as an excuse to play with common table expressions.
-- An exercise in Common Table Expessions. There are probably
-- faster solutions....
-- Run this against Flybase and discover the exons that belong
-- to more than one transcripts.
-- exon_name | transcripts
-- 14-3-3epsilon:1 | {14-3-3epsilon-RB,14-3-3epsilon-RD}
-- 14-3-3epsilon:2 | {14-3-3epsilon-RA,14-3-3epsilon-RC}
-- 14-3-3epsilon:3 | {14-3-3epsilon-RA,14-3-3epsilon-RB,14-3-3...
-- collect a bit of cvterm info
hartzell / feature-dump-1.sql
Last active August 29, 2015 14:05
Dump all of the features related to a starting feature (hardcoded....) using a recursive common table expression.
-- This works, starts with a feature and lists all of the features
-- it's related to, deals with cycles, homology seems to be reflexive
-- and symmetric.
with recursive
-- info about a subject/object pair
subj_feature_id, subj_name, subj_uniquename, subjterm_name,
obj_feature_id, obj_name, obj_uniquename, objterm_name,
hartzell / feature-dump-2.sql
Last active August 29, 2015 14:05
Dump the features related to a hard-coded starting feature, using two common table expressions (one recursive to build the set, one not recursive to expand set of columns)
-- Here's an example that takes the output of the recursive CTE
-- and then decorates it with details about the features and relationships.
with recursive pair(initial_feature,
subj_feature_id, relationship_id, obj_feature_id,
) as
select subj.feature_id,
subj.feature_id, fr.feature_relationship_id, obj.feature_id,
hartzell / gist:dc5e258b27d7c976f194
Created March 28, 2015 22:20
Fixes to mousex-getopt tests to handle underlying changes to getopt-long-descriptive.
allons:tmp georgewh$ diff -u -r mousex-getopt-0.35 mousex-getopt-0.35.BORKED
Only in mousex-getopt-0.35: Build
Only in mousex-getopt-0.35: MYMETA.json
Only in mousex-getopt-0.35: MYMETA.yml
Only in mousex-getopt-0.35: _build
Only in mousex-getopt-0.35: blib
diff -u -r mousex-getopt-0.35/t/104_override_usage.t mousex-getopt-0.35.BORKED/t/104_override_usage.t
--- mousex-getopt-0.35/t/104_override_usage.t 2015-03-28 15:13:44.000000000 -0700
+++ mousex-getopt-0.35.BORKED/t/104_override_usage.t 2014-03-10 00:02:07.000000000 -0700
@@ -44,8 +44,8 @@
hartzell / disable_cli_sshd.groovy
Created November 10, 2016 16:15
A groovy script to disable the built-in sshd server in Jenkins
// Drop this into init.groovy.d so that it gets executed at startup time.
// One could also use this script to explicitly set a port.
def inst = Jenkins.getInstance()
def sshDesc = inst.getDescriptor("org.jenkinsci.main.modules.sshd.SSHD")
hartzell / spack-build.out
Created November 29, 2016 21:12
shiny-server spack-build.out w/ '-- Installing' lines filtered out.
==> 'cmake' '/rss/spack-20161101/var/spack/stage/shiny-server-2016-11-04-iwyadliuj7yuyoxpu5dlgneaxq3ydlkv/shiny-server' '-DCMAKE_INSTALL_PREFIX:PATH=/rss/spack-20161101/opt/spack/linux-centos7-x86_64/gcc-5.4.0/shiny-server-2016-11-04-iwyadliuj7yuyoxpu5dlgneaxq3ydlkv' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE' '-DCMAKE_INSTALL_RPATH:STRING=/rss/spack-20161101/opt/spack/linux-centos7-x86_64/gcc-5.4.0/shiny-server-2016-11-04-iwyadliuj7yuyoxpu5dlgneaxq3ydlkv/lib:/rss/spack-20161101/opt/spack/linux-centos7-x86_64/gcc-5.4.0/shiny-server-2016-11-04-iwyadliuj7yuyoxpu5dlgneaxq3ydlkv/lib64:/rss/spack-20161101/opt/spack/linux-centos7-x86_64/gcc-5.4.0/bzip2-1.0.6-iro5tie325lhmx2ph36nox3namcf4wqm/lib:/rss/spack-20161101/opt/spack/linux-centos7-x86_64/gcc-5.4.0/cairo-1.14.0-crpytuydkcgzatow3xfst5cc5episr5e/lib:/rss/spack-20161101/opt/spack/linux-centos7-x86_64/gcc-5.4.0/fontconfig-2.11.1-ti2zz3wpp4yflrik6p7pt5nih7ngdhip/lib:/rss/spack-20161
hartzell / spack-build.out
Created January 6, 2017 22:51
Crash while building go on large machine
ok regexp 0.455s
ok regexp/syntax 1.000s
panic: test timed out after 3m0s
goroutine 22864 [running]:
panic(0x5be600, 0xc42017a010)
/tmp/hartzelg/spack-stage/spack-stage-ewK2oy/go/src/runtime/panic.go:500 +0x1a1 fp=0xc42010cf48 sp=0xc42010ceb8
/tmp/hartzelg/spack-stage/spack-stage-ewK2oy/go/src/testing/testing.go:918 +0x10b fp=0xc42010cfb0 sp=0xc42010cf48
hartzell / crash.txt
Created January 10, 2017 02:10
export GOMAXPROCS=16; spack install go@1.7.4
ok cmd/doc 0.060s
ok cmd/fix 0.075s
panic: test timed out after 3m0s
goroutine 522 [running]:
panic(0x825ac0, 0xc420201dc0)
/tmp/hartzelg/spack-stage/spack-stage-wUWCi0/go/src/runtime/panic.go:500 +0x1a1
/tmp/hartzelg/spack-stage/spack-stage-wUWCi0/go/src/testing/testing.go:918 +0x10b
created by time.goFunc

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

hartzell / output
Created February 6, 2017 15:58
Test failure building go@1.7.5
ok regexp 1.613s
ok regexp/syntax 1.400s
panic: test timed out after 3m0s
goroutine 22922 [running]:
panic(0x5bf600, 0xc4201881f0)
/tmp/hartzelg/spack-stage/spack-stage-zbOwMI/go/src/runtime/panic.go:500 +0x1a1 fp=0xc42010af48 sp=0xc42010aeb8
/tmp/hartzelg/spack-stage/spack-stage-zbOwMI/go/src/testing/testing.go:918 +0x10b fp=0xc42010afb0 sp=0xc42010af48