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
| global | |
| maxconn 4096 | |
| user nobody | |
| daemon | |
| defaults | |
| mode http | |
| frontend all 0.0.0.0:80 | |
| timeout client 86400000 |
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
| app.use(function(req, res, next) { | |
| req.url = req.url.replace("/cat",""); | |
| next(); | |
| }); | |
| app.use(app.router); | |
| // `/` and `/cat` | |
| app.get('/', function(req, res, next) { | |
| res.send('index'); |
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
| { | |
| "api_key":null, | |
| "test":false, | |
| "allow_preorder":true, | |
| "update_stock":true, | |
| "order":{ | |
| "client_ref":"1234", | |
| "po_number":"PO1234", | |
| "date_placed":"12/30/2010 23:59:59", | |
| "postage_speed":2, |
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
| app.param("hash",function(req, res, next, id){ | |
| req.hash_id = id; | |
| return next(); | |
| }); | |
| app.use(function(req, res, next){ | |
| console.log(req.hash_id); | |
| return next(); | |
| }); |
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
| var express = require('express') | |
| , http = require('http') | |
| , path = require('path'); | |
| var app = express(); | |
| app.configure(function(){ | |
| app.set('port', process.env.PORT || 3000); | |
| app.set('views', __dirname + '/views'); | |
| app.set('view engine', 'jade'); |
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
| $("#mailchimp-form").mailchimpList(function(mailchimp){ | |
| $(".removePostSubmit").hide(); | |
| if(mailchimp.success){ | |
| var _learnq = _learnq || []; | |
| _learnq.push(['identify', { | |
| '$email' : mailchimp.form_data.EMAIL, | |
| '$first_name' : mailchimp.form_data.FNAME, | |
| }]); | |
| _learnq.push(['track', 'Got Coupon Code', { |
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
| [10gen] | |
| name=10gen Repository | |
| baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
| gpgcheck=0 | |
| enabled=1 |
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
| { | |
| "billed": false, | |
| "created_at": "2013-03-07T15:48:23-05:00", | |
| "email": "thomas@holstee.com", | |
| "gift": false, | |
| "id": 75439, | |
| "order_orig": "45108", | |
| "originator": "shopify", | |
| "originator_id": "159188846", | |
| "originator_notified": false, |
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
| var _ = require("underscore"); | |
| var countries = [ | |
| { | |
| "name":"Andorra", | |
| "code":"AD" | |
| }, | |
| { | |
| "name":"Austria", | |
| "code":"AT" |
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
| /* More complicated use-case */ | |
| var v = {}; | |
| v.toru = (typeof req !== "undefined") ? 0 : "variable req is undefined"; | |
| v.derb = (!v.toru && dotty.exists(req, "body")) ? 0 : "req.body does not exist"; | |
| v.derh = (!v.toru && dotty.exists(req, "headers")) ? 0 : "req.headers does not exist"; | |
| v.dehu = (!v.derh && dotty.exists(req, "headers.user-agent")) ? 0 : "req.headers.user-agent does not exist"; | |
| v.deht = (!v.derh && dotty.exists(req, "headers.x-shopify-topic")) ? 0 : "req.headers.x-shopify-topic does not exist"; | |
| v.dehd = (!v.derh && dotty.exists(req, "headers.x-shopify-shop-domain")) ? 0 : "req.headers.x-shopify-shop-domain does not exist"; |