Skip to content

Instantly share code, notes, and snippets.

View peterdavidhamilton's full-sized avatar
🥁

Peter Hamilton peterdavidhamilton

🥁
View GitHub Profile
@bbonamin
bbonamin / Brewfile
Last active March 19, 2024 14:54
Capybara Selenium Webdriver: Headless Chrome (with file downloads!) & Headless Firefox
tap "caskroom/cask"
cask "google-chrome"
cask "firefox"
brew "chromedriver"
brew "geckodriver"
@millermedeiros
millermedeiros / osx_setup.md
Last active June 26, 2024 22:08
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@Zettt
Zettt / OpenMeta2OSXTags.sh
Last active May 5, 2021 15:58
Script that reads OpenMeta tags and writes them to OS X Mavericks tags. http://mosx.tumblr.com/post/54049528297/convert-openmeta-to-os-x-mavericks-tags-with-this This requires a OpenMeta binary to be installed. Change its path, if you prefer it to be somewhere else. For the files to be processed properly don't include a trailing slash in `$files…
# =============================================================
# = OpenMeta to OS X Tags =
# =============================================================
# Script to convert OpenMeta tags to OS X Mavericks tags.
#
# Created by Zettt (Andreas Zeitler) on 2013-06-28
# Source www.macosxscreencasts.com, mosx.tumblr.com
#
# OpenMeta to OS X Tags by Andreas Zeitler is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike
@nmcv
nmcv / snitchkiller.sh
Created April 30, 2013 23:15
Little Snitch 3 trial reset
#!/bin/bash
kill -9 `ps auxc | grep "Little Snitch Daemon" | awk '{print $2}'`;
echo "Killed Little Snitch Daemon" > /tmp/snitchkiller.log;
date >> /tmp/snitchkiller.log;
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
@ttscoff
ttscoff / rtftomarkdown.rb
Created October 9, 2012 21:05
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
@kechol
kechol / seeds.rb
Created June 15, 2012 07:35
insert rails seeds from google spreadsheet
require 'rubygems'
require 'google_drive'
# set your username and password
login = GoogleDrive.login(GoogleDrive::USERNAME, GoogleDrive::PASSWORD)
# set your spreadsheet key
sheet = login.spreadsheet_by_key(GoogleDrive::SPREADSHEET)
sheet.worksheets.each do |ws|
p ws.title
@abhishekkr
abhishekkr / gist:2479100
Created April 24, 2012 11:59
just a quick PuppetMaster Service Script for gem installed puppet set-up
#!/usr/bin/env ruby
module PuppetMaster
def self.puppetmaster_cmd
'puppet master --debug --verbose'
end
def self.start
puts "Starting Puppet Master in Debug+Verbose+Daemon mode logging to /var/log/puppet/a.log"
puts "Started." if system("#{puppetmaster_cmd} >> /var/log/puppet/a.log")
@pala
pala / hack.sh
Created March 31, 2012 17:08 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@torrancew
torrancew / Capfile
Created March 1, 2012 16:13
Puppet Capistrano Deploy
load 'deploy' if respond_to?(:namespace)
require 'rubygems'
require 'capistrano'
require 'railsless-deploy'
load 'config/deploy'
load 'config/cap_colors' # Optional; uses the capistrano_colors gem to customize output colorization