These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
# port of http://www.perlmonks.org/?node_id=162190 | |
# | |
# Please refactor this if necessary | |
# leonb -at- beriedata -dot- nl | |
# | |
class String | |
def yoda | |
word = %w{is be will show do try are teach have look help see can learn has}.select { |word| self =~ /\b#{word}\b/ }[0] | |
if word | |
x = (self =~ /\b#{word}\b/) + word.size |
require 'rubygems' | |
require 'mongo' | |
module MongoPubSub | |
QUEUES_COLLECTION = 'queues' | |
class EndSubscriptionException < Exception; end | |
class Publisher | |
def initialize(queue_name, mongo_connection) | |
# Initialize queue collection as a capped collection | |
if not mongo_connection[QUEUES_COLLECTION].collection_names.include?(queue_name) |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using Facebook; | |
using MyFacebookSite3434.Models; | |
using System.Web.Security; | |
namespace MyFacebookSite3434.Controllers |
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') | |
class BuildStatusTest < ActiveSupport::TestCase | |
context "expiring build statii" do | |
should "remove the old one" do | |
assert_equal 2, BuildStatus.count | |
BuildStatus.expire_old | |
statii = BuildStatus.all | |
assert_equal 1, statii.size | |
assert statii[0].updated_at >= 30.days.ago |
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') | |
class BuildStatusTest < ActiveSupport::TestCase | |
test "remove the old statii" do | |
assert_equal 2, BuildStatus.count | |
BuildStatus.expire_old | |
statii = BuildStatus.all | |
assert_equal 1, statii.size | |
assert statii[0].updated_at >= 30.days.ago | |
end |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
package main | |
import ( | |
"fmt" | |
) | |
type Node struct { | |
Value int | |
} |
var signForm = $.ajax({ | |
type: "POST", | |
url: "/some/form", | |
dataType: "JSON", | |
data: myData | |
}); | |
signForm.done(function(response){ | |
// handle success here | |
}); |