This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var displayInstagramImages = true; | |
if (displayInstagramImages) { | |
Campfire.InstagramExpander = Class.create({ | |
initialize: function(chat) { | |
this.chat = chat; | |
var messages = this.chat.transcript.messages; | |
for (var i = 0; i < messages.length; i++) { | |
this.detectInstagramURL(messages[i]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# | |
# Small script that spits some nonsense into a room on Campfire. | |
# | |
# Usage: | |
# | |
# ruby ~/path/to/babbelaar.rb campfire_token | |
# | |
# Where campfire_token is your [token](https://10to1.campfirenow.com/member/edit). | |
# It will keep talking until you quit it with Control-C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem "sinatra" | |
gem "rack-contrib" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /Users/pjaspers/.rvm/rubies/ruby-1.9.3-p0/bin/ruby | |
# -*- coding: utf-8 -*- | |
# (The spotify gem requires ruby 1.9.3) | |
# | |
# The [Hallon-gem](https://github.com/Burgestrand/Hallon/) for all things Spotify | |
require "hallon" | |
# Get an application key from Spotify (the binary kind), from [here](https://developer.spotify.com/en/libspotify/application-key/) | |
# The binary kind. | |
session = Hallon::Session.initialize(IO.read("./spotify_appkey.key")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def xcode_proj_name | |
File.basename(Dir.glob("*.xcodeproj").first, ".xcodeproj") | |
end | |
desc "Reset Xcode's autocompletion" | |
task :reset_xcode do | |
home_folder = File.expand_path("~") | |
project_name = xcode_proj_name | |
Dir.glob("#{home_folder}/Library/Developer/Xcode/DerivedData/#{project_name}*").each do |folder_path| | |
puts "Deleting #{folder_path}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Returns a nicely formatted datestring instead of core data's weird datetype. | |
function cddate() { | |
ruby -e "puts Time.at(Time.gm("2001", "01", "01").to_i + $1)" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Speciaal voor Inferis | |
// YES nil N | |
//Met ifs 0.452217 | |
//Met statement 0.430586 | |
//####################### | |
// | |
//NO nil N | |
//Met ifs 0.451592 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Gesuikerde kersen | |
- Zuurtjes | |
- spiegeleitjes | |
- zure matten. | |
- smurfen | |
- van die grote platte aardbeien | |
- poepegatjes. | |
- smoelentrekkers | |
- Neuzen (echte!) | |
- Mariakes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup | |
target = UIATarget.localTarget() | |
app = target.frontMostApp() | |
window = app.mainWindow() | |
# Some handy functions | |
dlog = (message) -> UIALogger.logDebug message | |
log = (message) -> UIALogger.logMessage message | |
should = (message) -> UIALogger.logStart "should #{message}" | |
fail = (message) -> UIALogger.logFail message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A check to see if we're running on an iPad. | |
// Blatantly picked up from: http://cocoawithlove.com/2010/07/tips-tricks-for-conditional-ios3-ios32.html | |
static inline BOOL IsIPad() { | |
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 | |
if ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && | |
[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) | |
{ | |
return YES; | |
} | |
else |