Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: iAtYJ4HpUVfIUoNnif1DA
| require 'sinatra' | |
| require 'infusionsoft' | |
| require 'logger' | |
| Infusionsoft.configure do |config| | |
| config.api_url = 'XXXX.infusionsoft.com' | |
| config.api_key = 'XXXXXXXXXXXXXXX' | |
| config.api_logger = Logger.new("./infusionsoft_api.log") | |
| end |
| # wordpress over fastcgi | |
| server { | |
| listen 81; | |
| server_name _; | |
| root /mnt/apps/airpair-blog/current; | |
| index index.html index.php /index.php; | |
| # restricting all dot files | |
| location ~ /\. { return 403; } |
| #!/bin/bash | |
| # Favicon and Apple Touch Icon Generator | |
| # | |
| # This bash script takes an image as a parameter, and uses ImageMagick to convert it to several | |
| # other formats used on modern websites. The following copies are generated: | |
| # | |
| # * apple-touch-icon-114x114-precomposed.png | |
| # * apple-touch-icon-57x57-precomposed.png | |
| # * apple-touch-icon-72x72-precomposed.png |
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: iAtYJ4HpUVfIUoNnif1DA
| var redis = require('redis') | |
| , client = redis.createClient() | |
| , assert = require('assert'); | |
| // redis.debug_mode = true; | |
| client.on("error", function (err) { | |
| console.log("Error " + err); | |
| }); |
| var http = require('http'); | |
| var fs = require('fs'); | |
| var ip = '127.0.0.1'; | |
| var port = 2000; | |
| var www = process.cwd(); | |
| var mimetypes = {'html': 'text/html', 'js': 'text/javascript', 'css': 'text/css', 'png': 'image/png', 'svg': 'image/svg'}; | |
| var path = require('path'); | |
| http.createServer(function (req, res) { | |
| fs.realpath(path.join(www, req.url), function(err, realpath){ |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl http://npmjs.org/install.sh | sh |
| // Routes | |
| app.get('/', userIsAuthenticated, function(req, res){ | |
| Doc.find( { loc : { $near : [50.62, -20.32], $maxDistance : 50 } } , function (err, docs) { | |
| res.render('index_authenticated.jade', { | |
| locals: { | |
| title: 'Welcome back to Gociety', | |
| status: 'logged in', | |
| currentUser: req.currentUser, | |
| user: req.currentUser, |
| function findBeer(words) { | |
| //...code... | |
| getResults(word, function(err, result){ | |
| // now you can access things! | |
| console.log(err, result); | |
| }); | |
| } | |
| function getResults(word, callback) { | |