- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory
This file contains 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
import Foundation | |
/// Parse RFC 3339 date string to NSDate | |
/// | |
/// :param: rfc3339DateTimeString string with format "yyyy-MM-ddTHH:mm:ssZ" | |
/// :returns: NSDate, or nil if string cannot be parsed | |
public func dateForRFC3339DateTimeString(rfc3339DateTimeString: String) -> NSDate? { | |
let formatter = getThreadLocalRFC3339DateFormatter() | |
return formatter.dateFromString(rfc3339DateTimeString) | |
} |
This file contains 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
// | |
// Swift-KVO | |
// | |
// Created by Jim Correia on 6/5/14. | |
// Copyright (c) 2014-2015 Jim Correia. All rights reserved. | |
// | |
// Update: 6/17/2014 | |
// | |
// KVOContext has gone away; use the same idiom you'd use from Objective-C for the context | |
// |
This file contains 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 python | |
# | |
# based on http://stackoverflow.com/a/2753343o | |
# | |
# input needs to be presorted | |
# | |
import math | |
import functools | |
import fileinput |
This file contains 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
#!/bin/bash | |
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password | |
# Updated to work with Vagrant 1.3.x | |
# Stage updated sudoers in a temporary file for syntax checking | |
TMP=$(mktemp -t vagrant_sudoers) | |
cat /etc/sudoers > $TMP | |
cat >> $TMP <<EOF | |
# Allow passwordless startup of Vagrant when using NFS. |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using MonoTouch.UIKit; | |
namespace Async.iOS | |
{ | |
public static class Layout | |
{ |
This file contains 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 page = new WebPage(), | |
address, output, size; | |
//capture and captureSelector functions adapted from CasperJS - https://github.com/n1k0/casperjs | |
capture = function(targetFile, clipRect) { | |
var previousClipRect; | |
var clipRect = {top: 0, left:0, width: 40, height: 40}; | |
if (clipRect) { | |
if (!isType(clipRect, "object")) { | |
throw new Error("clipRect must be an Object instance."); |
This file contains 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
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
This file contains 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
/* | |
via: http://javascriptweblog.wordpress.com/2010/09/20/auto-generating-javascript-unit-tests/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+JavascriptJavascript+(JavaScript,+JavaScript) | |
*/ | |
var tester = { | |
testing: [], | |
console: window.console || {log: function(a) {window.status = a}, warn: alert}, | |
defineBaseTests: function() { | |
this.baseTestBefore = [this.argumentsDefinedTest, this.thisBindingTest]; | |
this.baseTestAfter = [this.returnTest]; |
This file contains 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
//This is a model that will be used in each of the examples below. | |
public class Product | |
{ | |
public Product() | |
{ | |
// Default values are to be set here | |
Shipping = new Address(); | |
} | |
public ObjectId _id{get;set;} | |
public double Price{get;set;} |
NewerOlder