Skip to content

Instantly share code, notes, and snippets.

View kreeger's full-sized avatar

Ben Kreeger kreeger

View GitHub Profile
" Vim color file - benlight
" Generated by http://bytefluent.com/vivify 2013-10-07
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
@kreeger
kreeger / webcheck.rb
Last active December 26, 2015 17:49
Checks a given URL for changes, and emails a given address if there's a diff change.
#!/usr/bin/env ruby
#
# gem install nokogiri OR gem install hpricot
# gem install mail diffy premailer
# webcheck URL EMAIL
#
require 'open-uri'
require 'mail'
(function () {
if (!window.fluid) {
alert("This script is meant to be run in Fluid! You should disable it.");
return;
}
window.fluid.dockBadge = '';
setInterval(newNotif, 500);
@kreeger
kreeger / objective-c-blogs.markdown
Last active March 16, 2018 20:58
Awesome iOS & OS X blogs.

Awesome iOS & OS X development blogs

  • Itty Bitty Labs — creators of Reveal
  • NSHipster — highlighting different, sometimes obscure, parts of Cocoa, Cocoa Touch, Foundation, and more
  • objc.io — A monthly-ish periodical of Objective-C / Cocoa / Cocoa Touch development; one of the best
  • Peter Steinberger — he's a young curmudgeon, a grudgeful iOS developer; an excellent counterpoint to all the iOS/OS X love letters, with decent common sense
  • Use Your Loaf — quasi-frequent (every other week, now?) iOS development tips
  • iOS Dev Weekly*— a weekly digest of great iOS development articles; I get these via email
  • Ray Wenderlich — mostly tutorials, but many of them catch my eye as they pop up in my RSS feed
  • Ole Begemann — more general Apple developer culture and things
@kreeger
kreeger / !BDKCoreDataStore.markdown
Last active August 29, 2015 13:56
Core Data context management.

BDKCoreDataStore & BDKCoreDataOperation

These two classes are designed to work together to provide access to a common Core Data store, along with the contexts that go with it. The main NSManagedObjectContext is designed to be accessed on the main thread only. Safe background operations happen in a background NSOperationQueue to ensure that multiple reads and writes don't step on each others' toes.

It could use a tad of cleanup, but it's served me well for a few apps.

@kreeger
kreeger / lame.rb
Last active June 9, 2016 13:45
Converts a directory full of MP3s and M4As into uniform, -V5 MP3 files, filed away into directories, tagged with ID3 tags, ready to burn onto an MP3 CD.
#!/usr/bin/env ruby
require 'fileutils'
require 'pp'
directory = File.expand_path ARGV[0]
args = ARGV[1,ARGV.length-1].join(' ')
class Track
attr_accessor :source, :destination, :base_dir
@kreeger
kreeger / Ruby.tmLanguage
Last active October 29, 2015 20:53
My modified version of TextMate / Sublime Text's Ruby.tmLanguage file. To use with Sublime Text 3, and override its internal Ruby.tmLanguage, it'll need to live at "~/Library/Application Support/Sublime Text 3/Packages/Ruby/Ruby.tmLanguage".
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>
TODO: unresolved issues
text:
"p &lt;&lt; end
@kreeger
kreeger / Swift-Libs.markdown
Created July 9, 2014 12:03
Swift libraries I'm excited about.

Swift libraries I'm excited about

Even though I star these on GitHub, it's so easy to lose track of 'em, so I'm compiling a list here.

CocoaPods support

The CocoaPods team is looking into what it'll take to get Swift code to work more cleanly with iOS 8 and Xcode 6.

Keybase proof

I hereby claim:

  • I am kreeger on github.
  • I am kreeger (https://keybase.io/kreeger) on keybase.
  • I have a public key whose fingerprint is B22D 3423 BD76 F174 5E42 E7DE 489E A7C5 BF21 1B40

To claim this, I am signing this object:

Disable-UAC
Disable-InternetExplorerESC
Enable-MicrosoftUpdate
Install-WindowsUpdate
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar
cinst chocolatey
cinst git