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
// Welcome to Scala version 2.7.5.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_20). | |
// Type in expressions to have them evaluated. | |
// Type :help for more information. | |
scala> import dispatch._ | |
import dispatch._ | |
scala> import oauth._ | |
import oauth._ |
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 java.util.regex._ | |
import scala.xml._ | |
import org.mindrot.jbcrypt.BCrypt | |
import net.liftweb._ | |
import common._ | |
import http.S | |
import http.js._ | |
import json.JsonAST.{JNothing, JNull, JString, JValue} |
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
package code | |
import org.specs._ | |
import _root_.net.liftweb.mongodb.record._ | |
import _root_.net.liftweb.record.field._ | |
class SampleRecord extends MongoRecord[SampleRecord] | |
with MongoId[SampleRecord] { | |
def meta = SampleRecord |
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
# Apple Binary Property List serializer for Ruby 1.8. | |
require 'iconv' | |
module AppleBinaryPropertyList | |
MIME_TYPE = 'application/octet-stream' # Don't know what to use, so use a very generic type for now | |
CFData = Struct.new(:data) # For marking strings as binary data which will be decoded as a CFData object | |
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
<?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>Label</key> | |
<string>org.mongodb.mongod</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/mongodb/bin/mongod</string> | |
<string>run</string> |
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
Enable TRIM on non-Apple SSDs in OS X 10.8.2 Mountain Lion. | |
WARNING: This is ONLY tested on 10.8.2, and NOT earlier or later versions. YMMV. | |
Technical note: The driver changed in 10.8.2 and similar perl commands that worked in earlier OS X versions did not work for me once I updated to 10.8.2. | |
Run the following commands in Terminal… | |
1. Backup the original driver. Added -p to preserve original metadata about the file | |
sudo cp -p /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage ~root/IOAHCIBlockStorage-original |
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
Enable TRIM on non-Apple SSDs in OS X 10.8.2 Mountain Lion. | |
WARNING: This is ONLY tested on 10.8.2 (IOAHCIBlockStorage version 2.3.1), and NOT earlier or later versions. | |
Check /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist | |
Technical note: The driver changed in 10.8.2 and similar perl commands that worked in earlier OS X versions did not work for me once I updated to 10.8.2. | |
Run the following commands in Terminal… |
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
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original | |
# for Mountain Lion 10.8.3 - 10.8.5 | |
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x54)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage | |
# for Mountain Lion 10.8.1-10.8.2 and Lion 10.7.5 | |
#sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x4D)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage | |
# for Mountain Lion 10.8.0 and Lion 10.7.4 BELOW | |
#sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00{1,20})[^\x00]{9}(\x00{1,20}\x51)| |
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 java.io.File | |
/** | |
* A completely OS-Agnostic way of dealing with java.io.File paths | |
*/ | |
object RichPath { | |
sealed class RichBase[+A](left: A) { | |
/** | |
* Simple enrichment method designed to let you create a java.io.File | |
* by simply writing "folderA" / "folderB" / "folderC" |
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
// | |
// MultiDirectionAdjudicatingScrollView.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 12/16/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit | |
import UIKit.UIGestureRecognizerSubclass |
OlderNewer