Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jonbartlett's full-sized avatar

Jon Bartlett jonbartlett

  • Victoria, Australia
View GitHub Profile
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@pkuczynski
pkuczynski / parse_yaml.sh
Last active April 9, 2024 18:36
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@darconeous
darconeous / eagle-200-curl.md
Last active August 10, 2022 03:34
Eagle-200 Local Usage via CURL

Eagle-200 Local Usage via CURL

You can locally pull data from your Rainforest Eagle-200 using cURL.

Rainforest has published a local API document which explains the details of the protocol. But this particular document is about quickly getting to the point and giving you some cURL commands you can use to immediately start pulling out data.

Prerequisites

First, I'll assume that you have the following environment variables set:

@thewtex
thewtex / notify
Created February 17, 2013 02:13
Script to send a tmux, desktop, and audio notification after the completion of the given command when using tmux.
#!/bin/bash
# Send a tmux, desktop, and audio notification after the completion
# of the given command when using tmux.
#
# Requires: tmux
# Recommended: espeak, libnotify
tmux_window=$(/usr/bin/tmux list-windows \
-F "#{window_active} #{window_index} #{window_name}" | \

#Adding weather to your tmux status bar.

##Python file that writes the weather to a text file.

#!/Users/jhwhite/anaconda/bin/python
# -*- coding: utf-8 -*-

import forecastio
import math