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
<?php | |
$lc = sizeof($list); | |
for ($i = 0; $i < ( ($lc % 3 == 0) ? $lc : ($lc - ($lc % 3) + 3) ); $i = $i + 3) { // This loop defines the group you're in, $i will always be divisible by 3. | |
for ($si = 0; $si < ( ($i + 3 < $lc) ? 3 : ($lc - $i) ); $si++) // Determine which item is next in this group. | |
$a[] = list[$i + $si]; | |
$groups[] = $a; | |
} |
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>Disabled</key> | |
<false/> | |
<key>Label</key> | |
<string>org.postgresql.postgresqld.plist</string> | |
<key>ProgramArguments</key> | |
<array> |
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://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz | |
$ tar -zxvf wget-1.13.4.tar.gz | |
$ rm -r wget-1.13.4.tar.gz | |
$ cd wget-1.13.4/ | |
$ ./configure --prefix=/usr/local --with-ssl=openssl | |
$ make | |
$ sudo make install |
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
# | |
# 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
#!/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
// | |
// 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
<!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
{ | |
"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
#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]]; | |
} |
OlderNewer