Skip to content

Instantly share code, notes, and snippets.

View wkf's full-sized avatar
🤝

Will Farrell wkf

🤝
View GitHub Profile
Riemann::Tail.configure do |c|
c.format :host, :blue
c.format :metric, [:to_s, :cyan]
c.format :tags, :light_black do |t|
t.join(", ")
end
c.format :time, :light_black do |t|
t.localtime.strftime("%T")
function prompt_dir -d "Display the actual directory"
set -l root_path
set -l root_name
if command git rev-parse --is-inside-work-tree >/dev/null 2>&1
set root_path (command git rev-parse --show-toplevel 2> /dev/null)
set root_name (basename $root_path)
set root_path (echo $root_path | sed -e 's/\//\\\\\//g')
prompt_segment normal "#404040" (echo $root_name(pwd | sed -e "s/$root_path//g"))
else
prompt_segment normal "#404040" (prompt_pwd)
#!/bin/bash
r=${reason^^}
if [ "$r" = "REBOOT" ] || [ "$r" = "BOUND" ] || [ "$r" = "RENEW" ] && [ "$old_ip_address" != "$new_ip_address" ]; then
echo "address=/dev/$new_ip_address" > /etc/dnsmasq.d/dev
service dnsmasq restart
fi
{
model: 'DataSet',
data: {
title: "US natural gas statistics",
description: "Natural gas prices are a function of market supply and demand. Due to limited alternatives for natural gas consumption or production in the short run, changes in supply or demand over a short period often result in large price movements to bring supply and demand back into balance.",
url: "http://api.eia.gov/bulk/NG.zip",
rows: 9000,
format: "TXT",
vendorId: 3,
updateFrequency: "Quarterly",
---
- name: Add webupd8 apt key
apt_key: url="http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0xEEA14886" state=present
- name: Add webupd8 apt repository
apt_repository: repo="deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" state=present
- name: Select the Oracle License
shell: echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
# name: wkf
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for FISH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
## Set this options in your config.fish (if you want to :])
---
- name: add webupd8 apt key
apt_key: keyserver=keyserver.ubuntu.com id=EEA14886 state=present
- name: add webupd8 apt repository
apt_repository: repo='deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' state=present
- name: accept the oracle license
debconf: name='oracle-java7-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select'
---
- hosts: all
sudo: yes
tasks:
- name: add backports apt repo
apt_repository: repo="deb http://ftp.debian.org/debian wheezy-backports main" state=present
- name: update kernel
apt: pkg={{ item }} default_release=wheezy-backports update_cache=true state=latest
# A provisioner to allow reloading of a Vagrant VM during provisioning.
#
# This file should be placed into the same folder as your Vagrantfile. Then in
# your Vagrantfile, you'll want to do something like the following:
#
# ----------------------------------------------------------------------------
#
# require './vagrant-provision-reboot-plugin'
#
# Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# A provisioner to allow reloading of a Vagrant VM during provisioning.
#
# This file should be placed into the same folder as your Vagrantfile. Then in
# your Vagrantfile, you'll want to do something like the following:
#
# ----------------------------------------------------------------------------
#
# require './vagrant-provision-reboot-plugin'
#
# Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|