Skip to content

Instantly share code, notes, and snippets.

@wheresalice
wheresalice / install.sh
Last active February 22, 2017 08:38
Install community version of R Studio Server on CentOS 7
# Pound is in epel, so get that first
yum -y install epel-release
# Install dependencies
yum -y install R Pound wget
# Actually install RStudio Server
wget https://download2.rstudio.org/rstudio-server-rhel-1.0.136-x86_64.rpm
yum -y install --nogpgcheck rstudio-server-rhel-1.0.136-x86_64.rpm
@wheresalice
wheresalice / Dockerfile
Created February 17, 2017 16:46
Dockerfile to build a Docker image based on the Jupyter All Spark Notebook with additional Cloudera Hadoop configuration
# Copyright (c) Sky Betting & Gaming.
# Distributed under the terms of the Modified BSD License.
FROM jupyter/all-spark-notebook
LABEL description="Allspark notebook that includes CDH Hadoop client configuration"
MAINTAINER Alice Kaerast <alice.kaerast@skybettingandgaming.com>
USER root
ENV CDH=https://cdh.example.net
ENV HIVE=hive.example.net:10000
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
new-session
set -g prefix C-a
setw -g mouse on
set -g history-limit 30000
set -g default-terminal "screen-256color"
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
Data Elixir http://dataelixir.com/
Hadoop Weekly https://www.hadoopweekly.com/
Changelog Weekly https://changelog.com/weekly
Devops Weekly http://www.devopsweekly.com/
Ruby Weekly http://rubyweekly.com/
O’Reilly Data Newsletter http://www.oreilly.com/data/newsletter.html
NoSQL Weekly http://www.nosqlweekly.com/
Data is Plural https://tinyletter.com/data-is-plural
Data Science Weekly https://www.datascienceweekly.org/
High Scalability http://highscalability.com
sudo apt-get update
sudo apt-get install git
git clone https://github.com/MalcomRobb/dump1090.git
cd dump1090
sudo apt-get install gcc make librtlsdr0 rtl-sdr librtlsdr-dev pkg-config libusb-dev libusb-1.0-0-dev
make
./dump1090 --help
@wheresalice
wheresalice / bus_replacements.scala
Created August 7, 2016 15:14
If you work in big data, everything becomes a big data problem. So today I spent some time working with the GBRail Google Transit Feed data in Spark to produce a list of routes which currently have rail replacement buses operating.
/*
* Generate a CSV file listing all of the uk train routes which currently have a rail replacement bus service operating
*
* Download and unzip the data from http://www.gbrail.info/gtfs.zip into the directory gtfs before running this
*
* Start spark-shell with $SPARK_HOME/bin/spark-shell --packages com.databricks:spark-csv_2.10:1.3.0
* Then run the script below
*/
// load the csv files that have been downloaded from http://www.gbrail.info/ and unzipped into the directory gtfs

OpenWRT on BT Home Hub 2A no jtag

If you have a suitably old version of firmware on your BT Home Hub 2A then you can install OpenWRT on it without needing to upload any firmware through jtag. All you need is a single USB disk, which doesn't even have to be very big.

Boot the homehub and connect to the web interface on http://192.168.1.254. If the version at the bottom is < 8.1.H.J then you can proceed with the following

For the purposes of this post, $ represents a prompt on your desktop while > represents a prompt on the home hub.

You will need the files downloaded from http://openwrt.ebilan.co.uk/viewtopic.php?f=17&t=80&p=763#p747

@wheresalice
wheresalice / impala-discovery@.service
Last active April 16, 2016 14:22
CoreOS Impala Service
[Unit]
Description=Announce Impala@%i service
BindsTo=impala@%i.service
[Service]
EnvironmentFile=/etc/environment
ExecStart=/bin/sh -c "while true; do etcdctl set /announce/services/impala%i ${COREOS_PUBLIC_IPV4}:%i --ttl 60; sleep 45; done"
ExecStop=/usr/bin/etcdctl rm /announce/services/apache%i
[X-Fleet]