- You pass the reducer to this, it actually ultimately receives all navigation calls via onNavigate, which is mostly equivalent to Redux dispatch. It setState and persisting state. it is like the redux "store"
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
# Setup dir and repo | |
mkdir underscore-string | |
cd underscore-string | |
git init | |
# Make some files we'll need | |
touch README.md package.js smart.json | |
# Add the submodule and checkout the desired branch | |
git submodule add git://github.com/epeli/underscore.string.git lib/underscore.string |
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 "KWHCMatcher.h" | |
#import "KWMessageTracker.h" | |
#import "Kiwi.h" | |
@interface NSNotificationMatcher : NSObject <HCMatcher> | |
{ | |
NSDictionary *_userInfo; | |
} | |
+ (id)matcherWithUserInfo:(NSDictionary *)dictionary; |
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
@interface ExtendedManagedObject : NSManagedObject { | |
BOOL traversed; | |
} | |
@property (nonatomic, assign) BOOL traversed; | |
- (NSDictionary*) toDictionary; | |
- (void) populateFromDictionary:(NSDictionary*)dict; | |
+ (ExtendedManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict | |
inContext:(NSManagedObjectContext*)context; |
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
$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/screen co screen | |
$ curl http://old.evanmeagher.net/files/gnu-screen-vertsplit.patch > gnu-screen-vertsplit.patch | |
$ cd screen/src | |
$ patch < ../../gnu-screen-vertsplit.patch | |
$ ./configure --enable-locale --enable-telnet --enable-colors256 --enable-rxct_osc | |
$ 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
source :rubygems | |
gem "rake" | |
gem 'motion-logger' #cocoalumberjack wrapper |
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
# ... | |
[options] | |
# webpack loaders | |
module.name_mapper='.*\.css$' -> '<PROJECT_ROOT>/flow/stub/css-modules.js' | |
module.name_mapper='.*\.\(svg\|png\|jpg\|gif\)$' -> '<PROJECT_ROOT>/flow/stub/url-loader.js' |
This is an example of using Tether Drop with React Portal (and Redux for managing the state). I was asked if using React Portal is redundant, as both libraries pull the content into the <body>
. Using only Drop would cause an invariant violation in React becuase of the DOM mutation, so I'm using React Portal to first bring it outside without React complaining (I don't know how React Portal does it, I haven't checked out the source, but it works). Once it's out of React's supervision, I can apply Drop to it.
Dropdown.jsx
is the actual dropdown componentApp.jsx
is just an demo that uses it
This is my lazy way out of this limitation using an existing library that has much more features than you need, but chances are that you're going to need a library like React Portal anyway for stuff like modals.
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
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include |
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
/* Pretend app setup stuff is here */ | |
/* Kick off app */ | |
jQuery(function($) { | |
var Gallery = app.module("gallery"); | |
app.Router = Backbone.Router.extend({ | |
initialize: function() { | |
this.gallery = new Gallery.Router("gallery/"); |
OlderNewer