Skip to content

Instantly share code, notes, and snippets.

@stepahn
stepahn / carrierwave.rb
Created September 18, 2014 09:39
rspec carrierwave cleanup helper
module CarrierWaveRspec
@@tmpdir = Dir.mktmpdir
def cache_dir
"#{@@tmpdir}/uploads/tmp"
end
def store_dir
"#{@@tmpdir}/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}".tap{|s| puts s}
end
{
"name": "google-cast-sdk",
"version": "2.2.1",
"license": {
"type": "Commercial",
"text": "https://developers.google.com/terms/"
},
"summary": "Send and control video to Google Cast devices including the ChromeCast",
"description": "Google Cast is a screen-sharing technology that lets a user send and\ncontrol content like video from a small computing device like a phone,\ntablet, or laptop to a large display device like a television.\n\nA sender application running on the sender device uses the Google Cast\nAPI appropriate to its operating system to discover and transmit to the\nreceiver application running on the receiver device. You can use the\nsender APIs to enable your iOS app to send content to a large display.\n",
"homepage": "https://developers.google.com/cast/",
Pod::Spec.new do |s|
s.name = 'AdMob'
s.version = '6.4.2'
s.summary = 'Google AdMob Ads SDK.'
s.description = 'The Google AdMob Ads SDK allows developers to easily incorporate mobile-friendly text and image banners as well as rich, full-screen web apps known as interstitials.'
s.homepage = 'https://developers.google.com/mobile-ads-sdk/docs/'
s.license = {
:type => 'Copyright',
:text => <<-LICENSE
Copyright 2009 - 2013 Google, Inc. All rights reserved.
Pod::Spec.new do |s|
s.name = "Cordova"
s.version = "2.8.0"
s.summary = "Apache Cordova is a platform for building native mobile applications using HTML, CSS and JavaScript."
s.homepage = "http://cordova.apache.org/"
s.author = "Original developed by Nitobi (acquire by Adobe) and all other PhoneGap and Cordova Contributors"
s.license = 'Apache License, Version 2.0'
s.source = { :git => "https://github.com/apache/cordova-ios.git", :tag => "2.8.0" }
Pod::Spec.new do |s|
s.name = "NHCalendarActivity"
s.version = "0.0.1"
s.summary = "NHCalendar is a custom UIActivity that adds events and alarms to the Calendar."
s.homepage = "https://github.com/otaviocc/NHCalendarActivity"
s.author = "Otavio Cordeiro"
s.source = { :git => "https://github.com/otaviocc/NHCalendarActivity.git", :commit => '9ff91edd' }
s.platform = :ios
s.ios.deployment_target = '6.0'
@stepahn
stepahn / time.py
Created January 29, 2013 16:12 — forked from timfel/time.py
import time
import os
from pypy.rpython.tool import rffi_platform
from pypy.rpython.lltypesystem import rffi, lltype
from pypy.translator.tool.cbuild import ExternalCompilationInfo
from rupypy.module import ClassDef
from rupypy.objects.objectobject import W_Object
from rupypy.objects.exceptionobject import W_ArgumentError
@stepahn
stepahn / gist:3620893
Created September 4, 2012 12:50 — forked from anonymous/gist:3620872
pypy cross translation

Cross-translating for ARM

Here we describe the required setup and necessary steps to translate an interpreter with the RPython translator to target ARM using a cross compilation toolchain.

While it is possible to translate an RPython program for ARM directly on an ARM device following the normal translation steps it is not really feasible on most ARM machines. The alternative is to cross-translate using a cross-compilation toolchain.

@stepahn
stepahn / gist:1099278
Created July 22, 2011 11:27
growl iChat
-- growl notifications for ichat, based on
-- http://scriptingosx.com/2010/11/ichat-notification-with-growl/
property growlAppName : "Growl iChat"
property notificationNames : {"Buddy Became Available", ¬
"Buddy Became Unavailable", ¬
"Message Received", ¬
"Completed File Transfer"}
property defaultNotificationNames : {"Buddy Became Available", ¬
#!/bin/bash
DB_USER="root"
DB_PASS="…"
BACKUP_DIR="/srv/backups/mysql"
TODAY=$( date +%d)
DATABASES=$(mysql -u ${DB_USER} -p"${DB_PASS}" -N -B -e 'SHOW DATABASES')
for DATABASE in $DATABASES
do
@stepahn
stepahn / gist:886775
Created March 25, 2011 12:33
numbers and stuff
07 08 09 010 0b10 0×10 0d10
ruby 7 SyntaxError SyntaxError 8 2 16 10
python 7 SyntaxError SyntaxError 8 2 16 SyntaxError
javascript 7 8 9 8 SyntaxError: Unexpected token ILLEGAL 16 SyntaxError: Unexpected token ILLEGAL
php 7 0 0 8 SyntaxError 16 SyntaxError
scala 7 SyntaxError SyntaxError 8 SyntaxError 16 SyntaxError
groovy 7 SyntaxError SyntaxError 8 SyntaxError 16 SyntaxError
c 7 invalid digit in octal constant invalid digit in octal constant 8 invalid suffix on integer constan 16 invalid suffix on integer constan
java 7 number to large number to large 8 illegal start of expression 16 illegal start of expression
clang 7 invalid digit in octal constant invalid digit in octal constant 8 2 16 invalid digit in octal constant