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
user nginx; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
events { |
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
server { | |
listen 80; | |
server_name example.com; | |
location / { | |
root /var/www/example.com/html; | |
index index.php index.html; | |
if (!-e $request_filename) { | |
rewrite ^/(.*)$ /index.php?$1 last; |
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/sh | |
# chkconfig: 2345 98 02 | |
# description: PostgreSQL RDBMS | |
# This is an example of a start/stop script for SysV-style init, such | |
# as is used on Linux systems. You should edit some of the variables | |
# and maybe the 'echo' commands. | |
# | |
# Place this file at /etc/init.d/postgresql (or |
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/sh | |
### BEGIN INIT INFO | |
# Provides: php-fastcgi | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start and stop php-cgi in external FASTCGI mode | |
# Description: Start and stop php-cgi in external FASTCGI mode | |
### END INIT INFO |
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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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
NSString *foo = @"hello world"; | |
NSString *google = [NSString stringWithFormat:@"http://google.com/?q=%@", [foo stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; | |
// google = http://google.com/?q=hello%20world |
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 defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Rest Library | |
* | |
* @author Sam Soffes | |
* @author Josh Turmel | |
*/ | |
class Rest_Core { | |
private $use_cache; |
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+dateFromString.h | |
@interface NSDate (dateFromString) | |
+ (NSDate *)dateFromString:(NSString *)string; | |
@end | |
// NSDate+dateFromString.m | |
#import "NSDate+dateFromString.h" |
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
- (NSString *)previewMenuItemTitle | |
{ | |
NSWindow *previewWindow = [(MyDocument *)[self currentDocument] previewWindow]; | |
return ([previewWindow isVisible] ? @"Hide Preview" : @"Show Preview"); | |
} |
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
// | |
// LoadingView.h | |
// | |
// Created by Sam Soffes on 7/8/09. | |
// Copyright 2009 Sam Soffes. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface LoadingView : UIView { |