Skip to content

Instantly share code, notes, and snippets.

@fluxrad
fluxrad / MR Unstagnator.user.js
Last active April 18, 2018 23:16
MR Unstagnator
// ==UserScript==
// @name MR Unstagnator
// @namespace http://marginalrevolution.com/
// @version 0.1
// @description Make MR look better and more usable.
// @author Aaron Mills
// @match http*://marginalrevolution.com/*
// @grant GM_addStyle
// ==/UserScript==
@fluxrad
fluxrad / onedark.theme
Last active October 6, 2024 07:33
A one-dark theme for xfce4-terminal
[Scheme]
Name=One Dark
ColorForeground=#ABB2BF
ColorCursor=#ABB2BF
ColorBackground=#282C34
ColorSelection=#3B4451
ColorSelectionUseDefault=FALSE
ColorBold=#B9C0CB
ColorBoldUseDefault=FALSE
ColorPalette=#282C34;#E06C75;#98C379;#E5C07B;#61AFEF;#C678DD;#56B6C2;#ABB2BF;#3E4452;#BE5046;#98C379;#D19A66;#61AFEF;#C678DD;#56B6C2;#5C6370
@fluxrad
fluxrad / docker-up-or-reboot.sh
Created May 18, 2016 13:58
A script to check if the Docker daemon is up. If not, reboot after three failed docker ps commands.
#!/bin/bash
SLEEP_SECONDS=600
while true; do
for i in `seq 1 3`; do
timeout 5 docker ps -q && break || echo "Docker daemon is not running. Rebooting"
if [[ $i -eq 3 ]]; then
reboot
@fluxrad
fluxrad / keybase.md
Created March 29, 2016 13:47
Keybase proof

Keybase proof

I hereby claim:

  • I am fluxrad on github.
  • I am fluxrad (https://keybase.io/fluxrad) on keybase.
  • I have a public key ASAqmZbGFe3T3u48LvrAf3_r8MIAmmFvzkC5KYfGmAfNGgo

To claim this, I am signing this object:

@fluxrad
fluxrad / bar.js
Created April 9, 2015 20:17
Dynamically requiring module in NodeJS
exports.index = function(req, res) {
res.send('This is bar!');
};
@fluxrad
fluxrad / update_hostname.sh
Created November 6, 2014 22:08
Update hostname on an AWS instance
# Fix an EC2 instance's hostname.
echo "ip-$(echo $(curl -s http://169.254.169.254/latest/meta-data/local-ipv4 | tr '.' '-'))" | sudo tee /etc/hostname | sudo xargs hostname
@fluxrad
fluxrad / gist:be6088c7b4a752d2bf04
Created October 20, 2014 21:07
Dockerfile build fail.
FROM ruby:2.1.3
# works with ruby:2.1.2
# run with `docker build -t test .`
RUN apt-get -y update -qq && apt-get -y install r-base-dev
RUN pry
@fluxrad
fluxrad / Dockerfile
Created September 22, 2014 19:21
Dockerfile for a basic rbenv + rails environment
# Inspired by Deepak's setup here - https://gist.github.com/deepak/5925003
FROM ubuntu:14.04
RUN apt-get update -qq && apt-get install -y build-essential nodejs npm git curl mysql-client libmysqlclient-dev
RUN mkdir -p /my_awesome_social_media_app
# Install rbenv
RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh
@fluxrad
fluxrad / stackdriver.sh
Created September 11, 2014 20:46
Install Stackdriver Agent
#!/bin/bash
curl -o /etc/apt/sources.list.d/stackdriver.list http://repo.stackdriver.com/precise.list
curl --silent https://app.stackdriver.com/RPM-GPG-KEY-stackdriver |apt-key add -
apt-get update
apt-get install stackdriver-agent
@fluxrad
fluxrad / Gemfile
Created July 18, 2014 19:30
Explode a list of netmasks
source 'https://rubygems.org'
gem 'netaddr'