Skip to content

Instantly share code, notes, and snippets.

View RRCummins's full-sized avatar

Ryan Cummins RRCummins

View GitHub Profile
@robinsloan
robinsloan / langoliers.rb
Last active February 27, 2025 02:44
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"
@hofmannsven
hofmannsven / README.md
Last active October 2, 2025 20:17
Git CLI Cheatsheet
@ArtSabintsev
ArtSabintsev / Create iOS Icons.jsx
Last active December 24, 2015 22:19 — forked from twonjosh/Create iOS Icons.jsx
Create iOS App icons for iOS 4, 5, 6, 7, & 8
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@marcoarment
marcoarment / ATPLogoView.m
Created April 29, 2014 21:07
Source for the Accidental Tech Podcast (ATP) T-Shirt
// Source for the Accidental Tech Podcast (ATP) T-Shirt:
// http://www.marco.org/2014/04/29/atp-shirts
//
// By Marco Arment, April 28, 2014. MIT license.
@implementation ATPLogoView
- (void)drawRect:(CGRect)rectIgnored
{
NSString *fontName = @"MyriadPro-Semibold";
@hujunfeng
hujunfeng / wwdc14-sessions-titles
Last active May 8, 2021 06:18
WWDC 2014 sessions titles list
102 Platforms State of the Union
103 Apple Design Awards
201 Advanced Topics in Internationalization
202 What's New in Cocoa Touch
203 Introducing HealthKit
204 What's New in Cocoa
205 Creating Extensions for iOS and OS X, Part 1
206 Introducing the Modern WebKit API
207 Accessibility on OS X
@jpsim
jpsim / SwiftClassParsing.playground
Last active December 8, 2021 22:23
Swift and Objective-C Class Parsing
////////////////////////////////////////////////
//
// Swift and Objective-C Class Parsing
//
////////////////////////////////////////////////
import Foundation
// Class parsing
@mathewa6
mathewa6 / Algorithms.swift
Last active August 11, 2018 17:33
A review of basic algorithms in Swift, started after reading http://bost.ocks.org/mike/algorithms/
//A review thanks to http://bost.ocks.org/mike/algorithms/
import Foundation
func exchange<T>(inout elementsIn array: [T], i: Int, j: Int)
{
let temp: T = array[i]
array[i] = array[j]
array[j] = temp
}
extension Int {
func bottlesOfBeer() {
let bottles = "\(self) bottle" + (self == 1 ? "" : "s")
let what = " of beer on the wall"
println("\(bottles + what), \(bottles) of beer.")
print("Take one down, pass it around, ")
if self == 1 {
println("no more bottles\(what).")
if {
something();
// } else {
// somethingElse();
}
extension UIImage {
public func imageRotatedByDegrees(degrees: CGFloat) -> UIImage {
let radiansToDegrees: (CGFloat) -> CGFloat = {
return $0 * (180.0 / CGFloat(M_PI))
}
let degreesToRadians: (CGFloat) -> CGFloat = {
return $0 / (180.0 * CGFloat(M_PI))
}
// calculate the size of the rotated view's containing box for our drawing space