Skip to content

Instantly share code, notes, and snippets.

Jeff McFadden jeffmcfadden

Block or report user

Report or block jeffmcfadden

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 vote-for-brady.rb
require 'watir'
browser = Watir::Browser.new
while true do
begin
browser.goto "http://www.radiotimes.com/news/2017-07-21/radio-times-radio-and-podcast-champion-round-4-5"
sleep 1
puts "Clicking Brady Haran"
browser.radio(name: "PDI_answer9793268", value: "44802685" ).set
View keybase.md

Keybase proof

I hereby claim:

  • I am jeffmcfadden on github.
  • I am jeffmcfadden (https://keybase.io/jeffmcfadden) on keybase.
  • I have a public key ASB9qWgaupRgFMNBq21ZVJvMwmiY0sKmSBx3Sm7YvD51fAo

To claim this, I am signing this object:

View photo-post.html
---
layout: default
---
<div class="photo-post">
<div class="photo-post-photo">
<a href="{% asset_path "photos/{{page.photo_lg}}" %}"><img class="img" src="{% asset_path "photos/{{page.photo_sm}}" %}" /></a>
</div>
<div class="photo-post-caption">
<p class="desc">{{page.exif_desc}}</p>
View new-photo-post.sh
#!/usr/bin/env ruby
require 'optparse'
require 'yaml'
require 'time'
require 'date'
PHOTOS_DIR = "/Users/yourname/yoursite/_assets/images/photos"
POSTS_DIR = "/Users/yourname/yoursite/_posts"
View merge_asana_into_omnifocus.rb
#!/usr/bin/env ruby -E utf-8
# merge_asana_into_omnifocus.rb
# Hilton Lipschitz
# http://www.hiltmon.com
# Use and modify freely, attribution appreciated
# Script to import Asana projects and their tasks into
# OmniFocus and keep them up to date from Asana.
View morse_code_dictionary.rb
MORSE_CODE_DICTIONARY = {
"a" => ".-",
"b" => "-...",
"c" => "-.-.",
"d" => "-..",
"e" => ".",
"f" => "..-.",
"g" => "--.",
"h" => "....",
"i" => "..",
@jeffmcfadden
jeffmcfadden / esv_book_data.m
Last active Aug 29, 2015
ESV Data in ObjC Usable Formats
View esv_book_data.m
NSArray *books_and_chapters = @{@"Genesis" : @"50",
@"Exodus" : @"40",
@"Leviticus" : @"27",
@"Numbers" : @"36",
@"Deuteronomy" : @"34",
@"Joshua" : @"24",
@"Judges" : @"21",
@"Ruth" : @"4",
@"1 Samuel" : @"31",
@"2 Samuel" : @"24",
@jeffmcfadden
jeffmcfadden / geodesic.php
Created Sep 16, 2014
Geodesic Distance in PHP
View geodesic.php
function HowFar( $p1, $p2 ){
// WGS-84 Ellipsoid
$a = 6378137;
$b = 6356752.3142;
$f = 1/289.257223563;
$L = $p2->GetLong() - $p1->GetLong();
$U1 = atan( ( 1 - $f ) * tan( $p1->GetLat() ) );
$U2 = atan( ( 1 - $f ) * tan( $p2->GetLat() ) );
@jeffmcfadden
jeffmcfadden / IPCameraView.swift
Created Jul 2, 2014
A UIView Subclass For Displaying An IPCamera Stream (MJPEG)
View IPCameraView.swift
class IPCameraView: UIView, NSURLSessionDataDelegate {
var imageView:UIImageView
var url: NSURL
var endMarkerData: NSData
var receivedData: NSMutableData
var dataTask: NSURLSessionDataTask
init(frame: CGRect) {
@jeffmcfadden
jeffmcfadden / update_ip_addresses.rb
Created Jul 1, 2014
DNS Made Easy Dyanmic DNS Update Script
View update_ip_addresses.rb
#!/usr/bin/env ruby
require 'open-uri'
require "net/http"
require "uri"
# Change this
username = "fancypants"
# Set these up
You can’t perform that action at this time.