This file contains hidden or 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
| From: http://snipt.net/yonishin/about-xcode-4-project-template | |
| XCode 4 Projects and Files Template Folder: /Developer/Library/Xcode/Templates | |
| Examples: | |
| /Developer/Library/Xcode/Templates/Project Templates/Base/Other/Empty.xctemplate | |
| /Developer/Library/Xcode/Templates/Project Templates/Base/Base.xctemplate | |
| /Developer/Library/Xcode/Templates/Project Templates/Mac/Mac Base.xctemplate | |
| /Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate | |
| /Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Cocoa Application.xctemplate |
This file contains hidden or 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
| # Find the CUnit headers and libraries | |
| # | |
| # CUNIT_INCLUDE_DIRS - The CUnit include directory (directory where CUnit/CUnit.h was found) | |
| # CUNIT_LIBRARIES - The libraries needed to use CUnit | |
| # CUNIT_FOUND - True if CUnit found in system | |
| FIND_PATH(CUNIT_INCLUDE_DIR NAMES CUnit/CUnit.h) | |
| MARK_AS_ADVANCED(CUNIT_INCLUDE_DIR) |
This file contains hidden or 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" ?> | |
| <Data> | |
| <Series> | |
| <id>83462</id> | |
| <Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors> | |
| <Airs_DayOfWeek>Monday</Airs_DayOfWeek> | |
| <Airs_Time>10:00 PM</Airs_Time> | |
| <ContentRating>TV-PG</ContentRating> | |
| <FirstAired>2009-03-09</FirstAired> | |
| <Genre>|Drama|</Genre> |
This file contains hidden or 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
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential | |
| apt-get -y install git-core | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| # Add rbenv to the path: |
This file contains hidden or 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
| // | |
| // UIDeviceHardware.h | |
| // | |
| // Used to determine EXACT version of device software is running on. | |
| #import <Foundation/Foundation.h> | |
| @interface UIDeviceHardware : NSObject | |
| - (NSString *) platform; |
This file contains hidden or 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
| // clang -W -Wall -Wno-unused-parameter -framework Foundation -fobjc-arc test.m | |
| #import <Foundation/Foundation.h> | |
| #define IDARRAY(...) ((id[]){ __VA_ARGS__ }) | |
| #define IDCOUNT(...) (sizeof(IDARRAY(__VA_ARGS__)) / sizeof(id)) | |
| typedef id (^Tuple)(int); |
This file contains hidden or 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
| # coding: utf-8 | |
| require 'sinatra' | |
| set server: 'thin', connections: [] | |
| get '/' do | |
| halt erb(:login) unless params[:user] | |
| erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
| end | |
| get '/stream', provides: 'text/event-stream' do |
This file contains hidden or 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
| #if TARGET_OS_IPHONE | |
| #import <MobileCoreServices/MobileCoreServices.h> | |
| #else | |
| #import <CoreServices/CoreServices.h> | |
| #endif | |
| /* | |
| MIME type to UTI | |
| */ | |
| NSURLResponse *response = ... // assume a URL response from somewhere else. |
This file contains hidden or 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
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'fileutils' | |
| require 'date' | |
| require 'uri' | |
| # usage: ruby import.rb my-blog.xml | |
| # my-blog.xml is a file from Settings -> Basic -> Export in blogger. | |
| data = File.read ARGV[0] |