I hereby claim:
- I am jfro on github.
- I am jfro (https://keybase.io/jfro) on keybase.
- I have a public key whose fingerprint is B06C DA0C 453E A3E4 2749 0172 4D1E 4EC0 6B9D A115
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# -*- mode: ruby -*- | |
# vi: set ft=ruby fdl=99: | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
# Create a forwarded port mapping which allows access to a specific port |
#!/usr/bin/ruby | |
require 'fileutils' | |
require 'optparse' | |
options = {:verbose => false} | |
OptionParser.new do |opts| | |
opts.banner = "Usage: clean-old-sims.rb [options]\nLists old devices, deletes if -d is specified" | |
opts.on("-d", "--delete", "Delete old simulator devices") do |d| |
#!/bin/env ruby | |
deviceTypes = { | |
"iPhone 4s" => "com.apple.CoreSimulator.SimDeviceType.iPhone-4s", | |
"iPhone 5" => "com.apple.CoreSimulator.SimDeviceType.iPhone-5", | |
"iPhone 5s" => "com.apple.CoreSimulator.SimDeviceType.iPhone-5s", | |
"iPhone 6 Plus" => "com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus", | |
"iPhone 6" => "com.apple.CoreSimulator.SimDeviceType.iPhone-6", | |
"iPad 2" => "com.apple.CoreSimulator.SimDeviceType.iPad-2", | |
"iPad Retina" => "com.apple.CoreSimulator.SimDeviceType.iPad-Retina", |
#!/bin/env ruby | |
xcodes = Dir.glob("/Applications/Xcode*.app") | |
puts xcodes | |
xcodes.each do |xcode| | |
simctl = "#{xcode}/Contents/Developer/usr/bin/xcrun simctl" | |
puts "#{simctl} list" | |
out = %x{#{simctl} list} | |
out.lines.each do |line| | |
match = /(\s+)(.*)\s\(([\d\w]{8}-[\w\d]{4}-[\w\d]{4}-[\w\d]{4}-[\w\d]{12})\)/.match(line) | |
if match |
#!/usr/bin/ruby | |
require 'fileutils' | |
require 'optparse' | |
xcodePath = %x{xcode-select -print-path} | |
puts "Checking simulator devices against Xcode: #{xcodePath}" | |
options = {} | |
OptionParser.new do |opts| |
#! /bin/bash | |
# | |
# Write commands into the Nagios command file to schedule service | |
# downtime. | |
# | |
# Author: Kelly Cobean, Jr. <[email protected]> | |
# | |
# Based on a similar script by Sam Tilders <[email protected]> | |
# | |
# Requires: |
#!/bin/sh | |
VERSION=2.2.3 | |
URL=http://files.rubyforge.vm.bytemark.co.uk/redmine/redmine-$VERSION.tar.gz | |
SITES_DIR=/home/sites | |
SITE=example.com | |
cd $SITE_DIR | |
curl -O $URL |
#!/bin/sh | |
for sourceFile in $@ | |
do | |
fromEncoding=`file --mime-encoding $sourceFile | awk '{print $2}'` | |
encodingCheck=${fromEncoding:0:6} | |
if [ $encodingCheck == "utf-16" ]; then | |
echo "Converting from $fromEncoding to utf-8" | |
tempFile="$sourceFile-temp" |
# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png | |
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
crop_pwd() { | |
((MAXMID=$COLUMNS / 2)) # truncate to this value | |
mypath="%~" | |
echo -n "%$MAXMID<...<$mypath" | |
} |