Skip to content

Instantly share code, notes, and snippets.

View MR Unstagnator.user.js
// ==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 Dec 11, 2021
A one-dark theme for xfce4-terminal
View onedark.theme
[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
A script to check if the Docker daemon is up. If not, reboot after three failed docker ps commands.
View docker-up-or-reboot.sh
#!/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
View keybase.md

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 Apr 9, 2015
Dynamically requiring module in NodeJS
View bar.js
exports.index = function(req, res) {
res.send('This is bar!');
};
@fluxrad
fluxrad / update_hostname.sh
Created Nov 6, 2014
Update hostname on an AWS instance
View update_hostname.sh
# 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
View gist:be6088c7b4a752d2bf04
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 Sep 22, 2014
Dockerfile for a basic rbenv + rails environment
View Dockerfile
# 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 Sep 11, 2014
Install Stackdriver Agent
View stackdriver.sh
#!/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 Jul 18, 2014
Explode a list of netmasks
View Gemfile
source 'https://rubygems.org'
gem 'netaddr'