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/sh | |
aws kinesis describe-stream --stream-name $1 | | |
jq '.StreamDescription.Shards | map(select(.SequenceNumberRange.EndingSequenceNumber == null))' |
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
implicit class RichDfType(df: DfType) { | |
def f(pairs: List[(String, AType)]): DfType = pairs match { | |
case head :: tail => df.withColumn(head._1, head._2).f(tail) | |
case Nil => df | |
} | |
} |
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
function getRootDomain() { | |
var split = window.location.hostname.split('.'); | |
var position = split.length - 1; | |
while (position >= 0) { | |
var currentDomain = split.slice(position, split.length).join('.'); | |
document.cookie = 'unique=unique;domain=' + currentDomain + ';'; | |
if (document.cookie.indexOf('unique') > -1) { | |
return currentDomain; | |
} | |
position -= 1; |
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
if (!geolocationContextAdded && navigatorAlias.geolocation && navigatorAlias.geolocation.getCurrentPosition) { | |
navigator.geolocation.getCurrentPosition(function (position) { | |
var coords = position.coords; | |
var geolocationContext = { | |
schema: 'iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0', | |
data: { | |
latitude: coords.latitude, | |
longitude: coords.longitude, | |
latitudeLongitudeAccuracy: coords.accuracy, | |
altitude: coords.altitude, |
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
#!/usr/bin/python | |
import base64 | |
import sys | |
input = sys.argv[1] | |
def get_combinations(s): | |
return [base64.urlsafe_b64encode('a'*i + s)[2*i:-4] for i in range(3)] | |
for x in [get_combinations(intermediate) for intermediate in get_combinations(sys.argv[1])]: | |
for y in x: |
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
<script> | |
// If this tag fires more than once (e.g. page view followed by ecommerce action), | |
// we don't want to repeat the trackPageView here | |
if (!window.snowplow) { | |
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; | |
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) | |
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; | |
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","snowplow")); | |
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/sh | |
# This script updates copyright notices for all files in the current branch which have changed since master. | |
set -e | |
if [ -f tmp ]; | |
then | |
>&2 echo "Error - this script would overwrite the 'tmp' file" | |
exit 1 |
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 org.apache.avro.io._ | |
import org.apache.avro.specific._ | |
import org.apache.avro.file.DataFileWriter | |
import java.util.ArrayList | |
import java.io.File | |
import example.avro._ | |
import org.apache.avro.Schema | |
import org.apache.avro.generic._ | |
import org.apache.avro.file.DataFileReader | |
import org.apache.avro.util.ByteBufferOutputStream |
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 'octokit' | |
page = 1 | |
issues = [] | |
while true do | |
current_page = Octokit.list_issues('snowplow/snowplow', {milestone: 78, state: 'open',page: page}).map {|x| x.to_hash()}; | |
if current_page.empty? | |
break | |
end | |
issues += current_page |
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
/** | |
* @license | |
* Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> | |
* Build: `lodash exports="node" include="isArray, isFunction, isString, isObject, isDate, isUndefined, isNull, map, filter, find, compact, isEmpty, clone, cloneDeep" --debug --output src/js/lib_managed/lodash.js` | |
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> | |
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> | |
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
* Available under MIT license <http://lodash.com/license> | |
*/ | |
;(function() { |