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
| int main(int argc, const char * argv[]) | |
| { | |
| @autoreleasepool { | |
| if (argc == 1) { | |
| return 1; | |
| } | |
| NSString *word = [NSString stringWithCString:argv[1] encoding:NSUTF8StringEncoding]; | |
| CFStringRef result = DCSCopyTextDefinition(nil, (__bridge CFStringRef)word, CFRangeMake(0, word.length)); |
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
| objectManager = [RKObjectManager managerWithBaseURLString:kAPIBaseURL]; | |
| objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:kDataStore]; | |
| objectManager.objectStore = objectStore; | |
| // Set up object mappings, relationships, etc. e.g. | |
| RKObjectMapping *collectionMapping = [Item mappingInStore:objectStore]; | |
| // Pagination mapping | |
| RKObjectMapping *paginationMapping = [RKObjectMapping mappingForClass:[RKObjectPaginator class]]; | |
| [paginationMapping mapKeyPath:@"pagination.page" toAttribute:@"currentPage"]; |
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
| #!/bin/bash | |
| # install homebrew's official php tap | |
| brew tap josegonzalez/homebrew-php | |
| # install homebrew-dupes (required to install zlib, php54's dependency) | |
| brew tap homebrew/dupes | |
| # install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
| brew install nginx mysql |
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
| #!/bin/sh | |
| # script for optimizing images in a directory (recursive) | |
| # pngcrush & jpegtran settings from: | |
| # http://developer.yahoo.com/performance/rules.html#opt_images | |
| # pngcrush | |
| for png in `find $1 -iname "*.png"`; do | |
| echo "crushing $png ..." | |
| pngcrush -rem alla -reduce -brute "$png" temp.png |
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
| #!/bin/bash | |
| # | |
| # git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html) | |
| # modified by mike@mikepearce.net | |
| # modified by aconway@[redacted] - handle diffs that introduce new files | |
| # | |
| # Generate an SVN-compatible diff against the tip of the tracking branch | |
| # Get the tracking branch (if we're on a branch) | |
| TRACKING_BRANCH=`git svn info | grep URL | sed -e 's/.*\/branches\///'` |
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
| git diff --no-prefix | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" --ignore-space-at-eol > changes.patch |
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
| package com.xtextatl.example; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.util.Collections; | |
| import org.eclipse.core.runtime.NullProgressMonitor; | |
| import org.eclipse.emf.common.util.URI; | |
| import org.eclipse.emf.ecore.resource.Resource; | |
| import org.eclipse.m2m.atl.core.ATLCoreException; |