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
exports.charge = function(req, res){ | |
var pkg = req.body; | |
var token = pkg.token; | |
console.log("POST BODY"); | |
console.log(req.body); | |
var charge = rk.stripe.charges.create({ | |
amount: 3999, // amount in cents, again | |
currency: "usd", | |
card: token.id, |
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
exports.charge = function(req, res){ | |
var pkg = req.body; | |
var token = pkg.token; | |
console.log("POST BODY"); | |
console.log(req.body); | |
var charge = rk.stripe.charges.create({ | |
amount: 3999, // amount in cents, again | |
currency: "usd", | |
card: token.id, |
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
<script> | |
var handler = StripeCheckout.configure({ | |
key: '*****', | |
//image: '/square-image.png', | |
token: function(token, args) { | |
// Use the token to create the charge with a server-side script. | |
// You can access the token ID with `token.id` | |
console.log(token); | |
console.log(args); | |
var pkg = {'token':token, 'args':args}; |
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
brew doctor | |
Warning: /usr/local/etc isn't writable. | |
This can happen if you "sudo make install" software that isn't managed by | |
by Homebrew. If a brew tries to write a file to this directory, the | |
install will fail during the link step. | |
You should probably `chown` /usr/local/etc | |
Warning: /usr/local/share isn't writable. | |
This can happen if you "sudo make install" software that isn't managed by |
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 default behavior (in some init script probably) | |
$(document).ajaxError(function( event, jqxhr, settings, thrownError ) { | |
console.log('Ajax Error: ' + thrownError); | |
console.log('Ajax Error jqXHR: ' + jqxhr); | |
console.log('Ajax settings: ' + settings); | |
}); | |
$.ajaxSetup({ | |
dataType: json, |
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 serializedArray = [ | |
{name: 'location', value:'Location one'}, | |
{name: 'location', value:'Location two'} | |
] | |
// in practice | |
// var serializedArray = $(form).serializeArray(); | |
var mappedObject = serializedArray.map(function(location){ | |
return { location: location.value }; |
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
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param REQUEST_URI $request_uri; | |
fastcgi_param DOCUMENT_URI $document_uri; | |
fastcgi_param DOCUMENT_ROOT $document_root; | |
fastcgi_param SERVER_PROTOCOL $server_protocol; |
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
#!/bin/bash | |
## ABSOLUTE path to the PHP binary | |
PHPFCGI="/opt/local/bin/php-cgi" | |
## tcp-port to bind on | |
FCGIPORT="9000" | |
## IP to bind on | |
FCGIADDR="127.0.0.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
#user nobody; | |
worker_processes 1; | |
error_log /opt/local/var/log/nginx/error.log; | |
pid /opt/local/var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
brahma:shindig nathanloyer$ git status | |
# On branch master | |
# Changes to be committed: | |
# (use "git reset HEAD <file>..." to unstage) | |
# | |
# modified: content/sampledata/canonicaldb.json | |
# | |
# Unmerged paths: | |
# (use "git reset HEAD <file>..." to unstage) | |
# (use "git add/rm <file>..." as appropriate to mark resolution) |
OlderNewer