Skip to content

Instantly share code, notes, and snippets.

Jack Pearkes pearkes

Block or report user

Report or block pearkes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:59c9e4374c094c2d1d6f
### Keybase proof
I hereby claim:
* I am pearkes on github.
* I am pearkes (https://keybase.io/pearkes) on keybase.
* I have a public key whose fingerprint is CAEF EC63 11A9 0936 D2C5 3EA9 4FEF F066 DDE6 3A8C
To claim this, I am signing this object:
View atlas_box_upload.md

Uploading Boxes to Atlas via Curl

First, you'll need to get an access token.

Then, prepare the upload:

curl 'https://atlas.hashicorp.com/api/v1/box/USERNAME/BOX_NAME/version/VERSION/provider/PROVIDER_NAME/upload?access_token=ACCESS_TOKEN'
View gist:11401896

Banana Bread

Ingredients

  • 1/2 butter
  • 1 c. sugar
  • 2 eggs
  • 3 smashed bananas
  • 2 c. flour - whole grain or white spelt is best
  • 1 tsp. baking soda
@pearkes
pearkes / email.md
Last active Jan 15, 2016
An email template to send to your boss following the MongoHQ incident. Use 1Password (preferred), iCloud Keychain or LastPass.
View email.md

[BOSSES NAME],

Recently, a rather large database provider named MongoHQ had a security incident allowing the attackers to gain access to all of their customer databases.

Although we are not directly affected by this, it does raise a possible question:

  • Are we fully prepared for a similar intrusion?
  • Does our admin/support system have similar vulnerabilities?

Here is an excerpt from their security posting (bold is mine):

@pearkes
pearkes / host
Created Jun 30, 2013
If you run `host` with https://google.com, this strips the https://
View host
#!/bin/sh
# cp host /usr/local/bin/
# I only use host for checking records, and 9 times out of 10
# I copy paste the url from my browser. Chrome adds http[s]://
if [ -n "$1" ]
then
# 1 parameter, let's do this thing
/usr/bin/host ${1#*//}
@pearkes
pearkes / flactomp3
Last active Dec 18, 2015
flactomp3 converts a directory of flac files into 320 mp3's. Installation instructions below.
View flactomp3
#!/bin/sh
# Converts a directory of .flac files to the proprietary and lossy
# .mp3 format, retaining meta data.
#
# Note: Requires ffmpeg (brew/apt-get install ffmpeg)
#
# Use:
#
# flactomp3 DIRECTORY
View ssh_setup.sh
#!/usr/bin/env bash
# Run as root (sorry mom) like this: curl http://gist/test.sh | sed 's/defaulthost/pablo/g' | sudo sh
# This basically turns on ssh and sets a new hostname.
scutil --set HostName defaulthost
echo "Succesfully changed hostname to `hostname`"
echo "Enabling SSH access.."
systemsetup -setremotelogin on
@pearkes
pearkes / gist:4069203
Created Nov 13, 2012
My shell prompt, with Vagrant and Git status.
View gist:4069203
# Example: http://s.jack.ly/iXhJ
prompt() {
PS1="${GREEN}\W\$(parse_git_branch) $BROWN\$(parse_vm_state) ${GREEN}${GREY}"
PS2="\[[33;1m\]continue \[[0m[1m\]> "
}
parse_git_branch() {
View git-completion.bash
#!bash
#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
@pearkes
pearkes / gist:2403889
Created Apr 17, 2012
Google Weather Conditions
View gist:2403889
<!--
Google Weather API Conditions. Compiled by Dennis Delimarsky
-->
<!-- Last updated: March 12, 2010 -->
<conditions>
<type>PARTLY SUNNY</type>
<type>SCATTERED THUNDERSTORMS</type>
<type>SHOWERS</type>
<type>SCATTERED SHOWERS</type>
<type>RAIN AND SNOW</type>
You can’t perform that action at this time.