Skip to content

Instantly share code, notes, and snippets.

View technicalpickles's full-sized avatar

Josh Nichols technicalpickles

View GitHub Profile
@tylerdave
tylerdave / Nest API Example.ipynb
Last active January 6, 2022 22:34
Nest API Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@coliver
coliver / jameswhitemanifesto.txt
Created May 22, 2014 14:58
James White Manifesto
== Rules ==
On Infrastructure
-----------------
There is one system, not a collection of systems.
The desired state of the system should be a known quantity.
The "known quantity" must be machine parseable.
The actual state of the system must self-correct to the desired state.
The only authoritative source for the actual state of the system is the system.
The entire system must be deployable using source media and text files.
@n00neimp0rtant
n00neimp0rtant / gist:9515611
Last active March 14, 2024 06:30
simple squash without rebase
## within current branch, squashes all commits that are ahead of master down into one
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case)
## commit any working changes on branch "mybranchname", then...
git checkout master
git checkout -b mybranchname_temp
git merge --squash mybranchname
git commit -am "Message describing all squashed commits"
git branch -m mybranchname mybranchname_unsquashed
git branch -m mybranchname
@kdankov
kdankov / MacVim URL scheme
Created April 7, 2013 14:18
Send a link to a local file, open in MacVim and move the cursor to a specific line and column.
mvim://open?url=file:///etc/hosts&line=1&column=2
@gfontenot
gfontenot / caveatPatchor.js
Created April 30, 2012 21:14
Propane hack to expand spotify artist and album urls to embedded players.
// Display Spotify songs inline
if (displaySpotifySongs) {
Campfire.SpotifyExpander = Class.create({
initialize: function(chat) {
this.chat = chat;
var messages = this.chat.transcript.messages;
for (var i = 0; i < messages.length; i++) {
this.detectSpotifyURL(messages[i]);

The Ack Bar

Brainstorming an ideal landing page for indicating the status of working an Ops/Nagios/PagerDuty alert.

First, indicate your initial thoughts on the alert

I know, bro

@jrob00
jrob00 / caveatPatchor.js
Created March 1, 2012 23:28 — forked from protocool/caveatPatchor.js
Sample Propane caveatPatchor.js // with current hacks
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@phred
phred / caveatPatchor.js
Created October 6, 2011 17:31 — forked from protocool/caveatPatchor.js
caveatPatchor.js with barebones oohembed (now embedly?!) support for Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@cdown
cdown / gist:1163649
Last active April 9, 2024 01:10
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
@jjb
jjb / gist:996510
Created May 28, 2011 02:00
How to set the certificate file for Net::HTTP library-wide

In my previous post I described how to securely acquire the Mozilla list of root certificates and convert them to a form usable by curl and various libraries which don't ship with them.

Next, I want to point Net:HTTP at this file library-wide, so that it is used by all invocations of methods accessing https resources (in particular, Kernel#open, which in ruby 1.8.7 does not have a ca_file option and is therefore unusable with https). I hunted around the ruby standard library for a couple hours and came up with this:

require 'open-uri'
require 'net/https'

module Net
 class HTTP