View styed_component.js
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
const TeamSelectionContainer = styled.div` | |
height: 100%; | |
display: flex; | |
flex-direction: column; | |
color: white; | |
font-size: 25px; | |
`; |
View mobservable-vidom.js
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() { | |
function mrFactory(mobservable, vidom) { | |
if (!mobservable) | |
throw new Error("mobservable-vidom requires the Mobservable package.") | |
if (!vidom) | |
throw new Error("mobservable-vidom requires vidom to be available"); | |
var isTracking = false; | |
// WeakMap<Node, Object>; |
View AppDelegate.swift
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 Cocoa | |
import Few | |
private func render1(component: Few.Component<()>, state: ()) -> Element { | |
return View(backgroundColor: NSColor.redColor()) | |
.direction(.Column) | |
.flex(1) | |
} |
View Repository.coffee
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
Immutable = require('immutable') | |
immutableDiff = require("immutablediff") | |
sha = require("stable-sha1") | |
class Repository | |
constructor: (initialData) -> | |
@workingCopy = Immutable.fromJS(initialData) | |
@objectMap = {} | |
@author = "mrjjwright@gmail.com" |
View gist:3240020
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
cheerio = require('cheerio') | |
Shred = require('shred') | |
shred = new Shred() | |
http = require('http') | |
URL = require('url') | |
server = http.createServer (request, response) -> | |
url = URL.parse(request.url, true) | |
urlToDiscover = url.query['url'] | |
startDiscovery urlToDiscover, (theImageURL) -> |
View gist:3029371
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
- AppPlay is an interactive logic tool for app developers. Your app | |
manages lots of related logic: | |
- States | |
- Events | |
- Simple Conditional logic | |
- Stories | |
- User Actions | |
- Screenshots of how things should look. | |
- This logic is independent of how you technically implement it and | |
should be maintained outside your code. |
View ExampleAppDelegate.m
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
/* TUINSView is the bridge between the standard AppKit NSView-based heirarchy and the TUIView-based heirarchy */ | |
TUINSView *tuiScrollViewContainer = [[TUINSView alloc] initWithFrame:b]; | |
[scrollViewWindow setContentView:tuiScrollViewContainer]; | |
scrollExample = [[TUIScrollView alloc] initWithFrame:b]; | |
scrollExample.backgroundColor = [TUIColor redColor]; | |
TUITextView *textView = [[TUITextView alloc] initWithFrame:scrollExample.bounds]; | |
textView.text = @"hellodfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddfdfddf |
View TUILayout.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
// | |
// TUILayout.h | |
// Crew | |
// | |
// Created by John Wright on 11/13/11. | |
// Copyright (c) 2011 AirHeart. All rights reserved. | |
// | |
#define kTUILayoutViewHeight @"kTUILayoutViewHeight" |
View hyperlinkString.m
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
+(id)hyperlinkFromString:(NSString*)inString withURL:(NSURL*)aURL | |
{ | |
TUIAttributedString* attrString = [TUIAttributedString stringWithString:inString]; | |
NSRange range = NSMakeRange(0, [attrString length]); | |
[attrString beginEditing]; | |
[attrString addAttribute:NSLinkAttributeName value:[aURL absoluteString] range:range]; | |
// make the text appear in blue | |
NSColor *blueColor = [TUIColor colorWithHexString:@"#3B5998"].nsColor; |
View calculate.m
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
- (CGFloat)tableView:(TUITableView *)tableView heightForRowAtIndexPath:(TUIFastIndexPath *)indexPath | |
{ | |
CGFloat calcuatedHeight = 55.0; | |
NSDictionary *post = [_posts objectAtIndex:indexPath.row]; | |
NSString *type = [post valueForKey:@"type"]; | |
NSString *message = [post valueForKey:@"message"]; | |
if (!message) message = type; | |
TUIAttributedString *s = [TUIAttributedString stringWithString:message]; | |
[s setAlignment:TUITextAlignmentLeft lineBreakMode:TUILineBreakModeWordWrap]; | |
s.color = [TUIColor blackColor]; |
NewerOlder