Skip to content

Instantly share code, notes, and snippets.

View zacclark's full-sized avatar

Zac Clark zacclark

View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / gist:62f0b14d5ef532a4be2e2529187c100d
Created November 18, 2016 17:28
iOS Simulator fullscreen enabler
call ((NSWindow *)[(NSArray *)[[NSApplication sharedApplication] windows] lastObject]).collectionBehavior = 1<<7|1<<8|1<<11
import UIKit
protocol StoryboardBacked:class {
static func newFromStoryboardWithName(name:String?, bundle:NSBundle?) -> Self
}
extension StoryboardBacked {
static func newFromStoryboardWithName(name:String?, bundle:NSBundle?) -> Self {
let realName = name ?? NSStringFromClass(self as AnyClass).componentsSeparatedByString(".").last!
let storyboard = UIStoryboard(name: realName, bundle: bundle)

So yesterday brought the sad news that Google Reader is being killed off. C’est la vie it seems, given it was a Google product. In my search for an alternative I rediscovered Fever and decided to see if I could run it up for free on Heroku. Onwards...

Personally I think the news about Reeder is quite sad, as I would quite happily have paid for it as a service. In fact I like RSS so much that I actually shelled out the $30 for Fever when it first came out years ago (I was also pretty massive Shaun Inman fanboy if I’m being honest).

I ended up setting Fever aside because screw having to manage self-hosting for PHP and MySQL, right?

If you’re new to Fever I recommend going and checking it out, but also reading the post in response to the Google Reader announcement by Fevers author, Shaun, for a good list of what Fever is and isn’t.

Enough jibba-jabba!

@yamaya
yamaya / xcode-clang-vers
Last active April 2, 2025 00:16
Xcode clang version record
# Xcode 4.3.3
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
# Xcode 4.3.2
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/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
#
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
#! /usr/bin/env ruby
# this is best practice for writing mixins. the deferred evaluation is more
# powerful that the approach of ClassMethods/InstanceMethods as modules too
#
module Mixin
# put your class level code in here
#
ClassMethods = proc do
@zacclark
zacclark / xls.rb
Created March 30, 2011 04:12
Simple export to xls from Ruby.
# http://spreadsheet.rubyforge.org/file.GUIDE.html
require 'rubygems'
require 'spreadsheet'
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet
sheet1.name = 'Testing Naming'
class Array
# Array.zipper: like Array#zip, but produces and full and even distributed
# array for 1,2, or N arrays. eg:
#
# a = %w( a b c d e f g h i )
# b = %w( 0 1 2 )
# c = %w( A B C D E F )
#
# zippered = Array.zipper(a, b, c)
require 'nfc'
tags = {
"04823691212580" => "Fitter, happier, more productive",
"04673391212580" => "comfortable",
"04C33091212580" => "not drinking too much",
"04C92C91212580" => "regular exercise at the gym",
"04F15D91212580" => "three days a week",
"041C9F91212581" => "getting on better with your associate employee contemporaries",
"04D79A91212580" => "at ease",