Skip to content

Instantly share code, notes, and snippets.

@drewr
drewr / run-zing.zsh
Last active October 3, 2016 19:06
Haskell is a better Python. Continuously run arg, snapping working dir (minus .git) on failures. Optionally upload failures to S3.
PATH=/usr/local/bin:$PATH
[[ -z $1 ]] && echo run-zing NUM && exit 99
run_number=$1
if [[ $(facter os.name) == 'CentOS' ]]; then
ZING_HOME=/opt/zing/zing-jdk1.8.0-16.01.9.0-1-x86_64
else
ZING_HOME=/opt/zing/zing-jdk1.8.0-16.01.9.0-1
fi
#!/usr/bin/env zsh
if [[ $USER == "drewr" ]]; then
mkdir -p ~/src/drewr
[[ -d ~/src/drewr/dotfiles ]] || git clone https://github.com/drewr/dotfiles ~/src/drewr/dotfiles
( cd ~/src/drewr/dotfiles && make install )
fi
echo set up nvm
if [[ ! -d $HOME/.nvm ]]; then
Exception: STATUS_ACCESS_VIOLATION at rip=00180198E20
rax=000000000023C980 rbx=000000000023CB00 rcx=8080808080808080
rdx=0000000000000000 rsi=FEFEFEFEFEFEFEFF rdi=000000000023CA78
r8 =00000000000000FE r9 =0000000000000000 r10=000000000023C820
r11=000000000023C980 r12=0000000000000000 r13=0000000000000002
r14=000000000023CB6C r15=0000000000000000
rbp=000000000023C9E0 rsp=000000000023C948
program=C:\Program Files\OpenSSH\bin\bash.exe, pid 2744, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@drewr
drewr / ipv4-1.txt
Last active February 9, 2016 16:52
Routes between Nashville cable endpoints
% traceroute 66.249.83.154
traceroute to 66.249.83.154 (66.249.83.154), 30 hops max, 60 byte packets
1 10.0.1.1 (10.0.1.1) 0.778 ms 0.815 ms 0.882 ms
2 96.120.52.173 (96.120.52.173) 142.769 ms 144.085 ms 145.409 ms
3 xe-7-2-0-sur01.blairblvd.tn.nash.comcast.net (68.85.199.1) 144.089 ms 145.382 ms 145.393 ms
4 xe-11-2-0-0-sur02.blairblvd.tn.nash.comcast.net (162.151.94.78) 146.764 ms 146.745 ms xe-11-3-0-0-sur02.blairblvd.tn.nash.comcast.net (68.85.174.82) 146.754 ms
5 xe-0-0-12-0-ar02.goodslettvll.tn.nash.comcast.net (162.151.116.233) 147.967 ms 148.014 ms xe-0-0-9-0-ar02.goodslettvll.tn.nash.comcast.net (162.151.116.237) 148.003 ms
6 be-22909-cr02.56marietta.ga.ibone.comcast.net (68.86.91.245) 156.964 ms 152.656 ms 154.187 ms
7 hu-0-12-0-1-pe04.56marietta.ga.ibone.comcast.net (68.86.88.182) 154.176 ms 169.856 ms 21.892 ms
8 as174.ashburn.va.ibone.comcast.net (66.208.229.138) 24.341 ms 25.393 ms 25.402 ms
@drewr
drewr / ipv41.txt
Created February 9, 2016 16:51
Routes between Nashville cable endpoints
% traceroute 66.249.83.154
traceroute to 66.249.83.154 (66.249.83.154), 30 hops max, 60 byte packets
1 10.0.1.1 (10.0.1.1) 0.778 ms 0.815 ms 0.882 ms
2 96.120.52.173 (96.120.52.173) 142.769 ms 144.085 ms 145.409 ms
3 xe-7-2-0-sur01.blairblvd.tn.nash.comcast.net (68.85.199.1) 144.089 ms 145.382 ms 145.393 ms
4 xe-11-2-0-0-sur02.blairblvd.tn.nash.comcast.net (162.151.94.78) 146.764 ms 146.745 ms xe-11-3-0-0-sur02.blairblvd.tn.nash.comcast.net (68.85.174.82) 146.754 ms
5 xe-0-0-12-0-ar02.goodslettvll.tn.nash.comcast.net (162.151.116.233) 147.967 ms 148.014 ms xe-0-0-9-0-ar02.goodslettvll.tn.nash.comcast.net (162.151.116.237) 148.003 ms
6 be-22909-cr02.56marietta.ga.ibone.comcast.net (68.86.91.245) 156.964 ms 152.656 ms 154.187 ms
7 hu-0-12-0-1-pe04.56marietta.ga.ibone.comcast.net (68.86.88.182) 154.176 ms 169.856 ms 21.892 ms
8 as174.ashburn.va.ibone.comcast.net (66.208.229.138) 24.341 ms 25.393 ms 25.402 ms
i=64
while java -Xmx${i}m -Xms${i}m -version >/dev/null 2>&1; do
i=$(( $i + 1 ))
done
echo last jvm died at ${i}m
@drewr
drewr / Main.purs
Last active January 27, 2016 18:10
module Main where
import Prelude
import Data.Array
import qualified Data.Array.Unsafe as U
import Data.Maybe
import Data.Foldable
import Control.Monad.Eff.Console (log)
data Path = Directory String (Array Path)
@drewr
drewr / fix-facter-path.hs
Last active January 6, 2016 18:30
Normalize some paths until we fix the AMIs
{-# LANGUAGE OverloadedStrings #-}
module Main where
-- Make static:
-- ghc -O2 --make -static -optc-static -optl-static -fvia-C -optl-pthread fix-facter-path.hs
import Turtle
import Data.Text (Text, pack)
import Filesystem.Path.CurrentOS (fromText, basename, dirname)
import Prelude hiding (FilePath)
@drewr
drewr / jenkins.log
Created November 9, 2015 23:03
Touching the filesystem from Java in a Jenkins run is tricky
Started by user anonymous
Building remotely on hotel (server) in workspace /h/jenkins/workspace/elastic,runbld,master
No JDK named ‘null’ found
[elastic,runbld,master] $ /usr/local/bin/runbld /tmp/hudson5777054172083384843.sh
user.dir /h/jenkins/workspace/elastic,runbld,master
>>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
"repo dir" "/h/jenkins/git-cache/elastic/runbld"
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
at java.io.File.toPath(File.java:2234)