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 <CocoaSecurity/CocoaSecurity.h> | |
- (NSString *)encodeUsername:(NSString *)username password:(NSString *)password | |
{ | |
CocoaSecurityEncoder *encoder = [[CocoaSecurityEncoder alloc] init]; | |
NSString *pair = [NSString stringWithFormat:@"%@:%@", username, password]; | |
return [encoder base64:[pair dataUsingEncoding:NSUTF8StringEncoding]]; | |
} |
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
{ | |
"ProductId" : 646, | |
"OrderPayments" : [ | |
{ | |
"Payer" : { | |
"FacebookId" : "689561194" | |
}, | |
"IncludeTip" : true, | |
"PaymentMethod" : { | |
"Id" : 138 |
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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Rationale Creative</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link href="css/bootstrap-responsive.css" rel="stylesheet"> |
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
// | |
// NSDate+Additions.m | |
// | |
// Created by Trevor Sheridan on 10/1/12. | |
// Copyright (c) 2012 Trevor Sheridan Inc. All rights reserved. | |
// | |
#import "NSDate+Additions.h" | |
@implementation NSDate (Additions) |
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 | |
temp="/tmp/size-"$(date +"%s")"-tmp.png" | |
em=10 | |
convert $1 -rotate $2 $temp | |
convert $temp -scale $3 -rotate $(echo "$2 * -1" | bc) -trim -shave 2x2 $temp | |
identify -format "dimensions: %w x %h pixels\nwidth: %[fx:w/$em]em;\nheight: %[fx:h/$em]em;" $temp | |
rm -rf $temp |
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
# | |
# Virtual Hosts | |
# | |
# If you want to maintain multiple domains/hostnames on your | |
# machine you can setup VirtualHost containers for them. Most configurations | |
# use only name-based virtual hosts so the server doesn't need to worry about | |
# IP addresses. This is indicated by the asterisks in the directives below. | |
# | |
# Please see the documentation at | |
# <URL:http://httpd.apache.org/docs/2.2/vhosts/> |
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
(function() { | |
var Detective = window.Detective = Backbone.Base.extend({ | |
initialize: function() { | |
snack.publisher(this); | |
this.ua = window.navigator.userAgent; | |
return this; | |
}, |
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
Getting the Source | |
$ cd ~/source | |
$ curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz | |
$ tar -zxvf lame-3.99.5.tar.gz | |
$ rm -r lame-3.99.5.tar.gz | |
$ cd lame-3.99.5 | |
Installing | |
$ ./configure | |
$ make |
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
$ cd ~/source | |
$ ftp http://developer.kde.org/~wheeler/files/src/taglib-1.7.1.tar.gz | |
$ tar -zxvf taglib-1.7.1.tar.gz | |
$ rm -r taglib-1.7.1.tar.gz | |
$ cd taglib-1.7.1 | |
$ cmake -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 \ | |
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \ | |
-DENABLE_STATIC=ON \ |
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
$ cd ~/source | |
$ ftp http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz | |
$ tar -zxvf cmake-2.8.7.tar.gz | |
$ rm -r cmake-2.8.7.tar.gz | |
$ cd cmake-2.8.7 | |
$ ./bootstrap | |
$ make | |
$ sudo make install |
NewerOlder