-
The Engineering Question: Can you create breakthrough technology (vs. incremental improvement)?
-
The Timing Question: Is now the right time to start this particular business?
-
The Monopoly Question: Are you starting with a big share of a small market?
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
let Thing = (props) => ( | |
<div>look {props.name}! no state!</div> | |
) | |
render(<Thing name="Ma"/>, el) |
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
DATA_DIR="__data" | |
POSTGRES_VERSION=9.3 | |
PORT=5432 | |
.PHONY: docker-check postgres | |
docker-check: | |
@command -v docker >/dev/null 2>&1 || \ | |
{ echo >&2 "Docker needs to be installed and on your PATH. Aborting."; exit 1; } |
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
- (void)uploadImage:(UIImage *)image | |
{ | |
//Set up the upload request from our server | |
NSURL *url = [NSURL URLWithString:@"http://<your-server-url-here>/"]; | |
NSURLRequest *request = [NSURLRequest requestWithURL:url]; | |
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { | |
// Pull out any required information out of the response | |
NSString *serverDate = [JSON valueForKeyPath:@"date_string"]; |
Here are some things I have learned along the way.
Last Updated: 2013-02-08
Original Audience: Hack Reactor
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
{ | |
"page":1, | |
"actions":{ | |
"add":{ | |
"url":"http://localhost:3000/events.json", | |
"method":"post", | |
"fields":{ | |
"category_id":{ | |
"type":"integer", | |
"length":null, |
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
web: gunicorn -w4 -b0.0.0.0:$PORT app:app |
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
var user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: false | |
); |
WAL-E needs to be installed on all machines, masters and slaves.
Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf
is:
archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
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
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.ImageReplacer = Class.create({ | |
_defaultOptions: { | |
listenToSwapView: true, | |
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
filenameInsert: "_☃x", | |
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
attribute: "data-hires", |
NewerOlder