Skip to content

Instantly share code, notes, and snippets.

Wade Jensen wadejensen

Block or report user

Report or block wadejensen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View snowplow-mini-vagrant-3.log
~/repos/snowplow-mini  v0.6.1±
$ vagrant up
/opt/vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /nix/store/fa6x8wrsaj1lkb32hqv8wcpp4hiaxqbz-bazel-0.24.0 in PATH, mode 040777
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/xenial64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/xenial64' version '20190605.0.0' is up to date...
==> default: Setting the name of the VM: snowplow-mini-1560726310
==> default: Vagrant has detected a configuration issue which exposes a
==> default: vulnerability with the installed version of VirtualBox. The
View snowplow-mini-vagrant-2.log
Wades-MBP:snowplow-mini wjensen$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/bionic64' version '20190604.0.0' is up to date...
==> default: Setting the name of the VM: snowplow-mini-1560287512
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
@wadejensen
wadejensen / snowplow-mini-vagrant.log
Created Jun 11, 2019
Local snowplow-mini with Vagrant attempt
View snowplow-mini-vagrant.log
~/repos/snowplow-mini  master
$ git clone https://github.com/snowplow/snowplow-mini.git
~/repos/snowplow-mini  master
cd snowplow-mini
~/repos/snowplow-mini  master
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
@wadejensen
wadejensen / perfTest.scala
Created Nov 8, 2017
Trying to work out why line 5 is super expensive
View perfTest.scala
// ...
var alpha = atan2(sLambda * cEpsilon, cLambda)
// This calculation is 100X more expensive than trig functions on NDArray of same size
val temp = alpha.cond( Conditions.lessThan(0.0) ) * (2 * math.Pi)
val alpha2 = alpha + temp
val delta = asin(sLambda * sEpsilon)
// ...
@wadejensen
wadejensen / parse-options.sh
Created Nov 1, 2017 — forked from cosimo/parse-options.sh
Example of how to parse options with bash/getopt
View parse-options.sh
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"
View gist:ae5732567ea7f93cdee58f769a2b97da
def urlses(cl: ClassLoader): Array[java.net.URL] = cl match {
case null => Array()
case u: java.net.URLClassLoader => u.getURLs() ++ urlses(cl.getParent)
case _ => urlses(cl.getParent)
}
val urls = urlses(getClass.getClassLoader)
println(urls.filterNot(_.toString.contains("ivy")).mkString("\n"))
@wadejensen
wadejensen / NeighbourBinarySearch.scala
Last active Sep 25, 2017
Scala binary search for exact match or neighbour on floating point numbers
View NeighbourBinarySearch.scala
/**
* A functional binary tree search for floating point numbers which finds
* a neighbour to the search target in the given list.
* Returns upper or lower index if target is outside min and max of list.
* @param start Lower index of the array to search
* @param end Upper index of the array to search
* @param target Value being searched for in list
* @param list Sorted list of values to search
* @return Index of a neighbour to the target within list
* (not guaranteed to be nearest neighbour)
You can’t perform that action at this time.