Skip to content

Instantly share code, notes, and snippets.

View sheatsb's full-sized avatar
💭
I may be slow to respond.

sheatsb

💭
I may be slow to respond.
View GitHub Profile
@sheatsb
sheatsb / migrate-gems.sh
Created January 17, 2018 07:10 — forked from keltia/migrate-gems.sh
Migrate all gems from one Ruby version to another, useful when using `rbenv`
#!/bin/zsh -i
# if you're using ZSH, change the shebang above to "#!/bin/zsh -i"
eval "$(rbenv init -)"
if [ ${#} -ne 2 ]; then
echo >&2 Usage: $(basename ${0}) old-version new-version
exit 1
fi
@sheatsb
sheatsb / zshrc
Created December 4, 2016 21:56
zshconf
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
@sheatsb
sheatsb / wp-shame-eraser.sql
Last active July 15, 2016 01:00
Delete old WordPress posts by date
/**
Whatever you do, back up your DB first!
It's very important.
Really.
I can't help if old data's gone forever.
How it works:
First delete your posts. Your date needs to be in YYYYMMDD format.
In this example, it's anything before Jan. 1, 2007.
@sheatsb
sheatsb / keybase.md
Last active February 11, 2017 02:11

Keybase proof

I hereby claim:

  • I am sheatsb on github.
  • I am sheatsb (https://keybase.io/sheatsb) on keybase.
  • I have a public key ASCPITCJeDNGd9zR0Gxwvy8xy5E9l5pvtq8rhrflaPy-xQo

To claim this, I am signing this object:

@sheatsb
sheatsb / clouddns-export.py
Created October 2, 2015 04:43 — forked from DavidWittman/clouddns-export.py
Exports all domains for a Rackspace Cloud account in BIND9 format
#!/usr/bin/env python
import json
import os
import time
import clouddns
USERNAME = ''
APIKEY = ''

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat

Tiny Content Framework

About the Project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Contribute

There’s more to come, and I’d love to hear what you think. Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com). We all benefit from sharing our ideas and creating standards. Onward.

#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@sheatsb
sheatsb / laptop.sh
Last active August 19, 2016 15:08
Laptop config
#!/bin/zsh
### end common-components/bash-shebang
# Welcome to the thoughtbot laptop script! Be prepared to turn your laptop (or
# desktop, no haters here) into an awesome development machine.
# This file is auto-generated. Do not edit it by hand unless you know what
# you're doing. Please see 'CONTRIBUTING.md' for more information.
### end common-components/header
#!/usr/bin/ruby
# Make sure you have these gems installed
require 'rubygems'
require 'thread'
require 'csv'
require 'twitter'
require 'marky_markov'
# Create a new Twitter account that you'd like to have your auto-tweets posted to