I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis onto
the box and here's how I did it and some things to look
out for.
To install:
| // See comments below. | |
| // This code sample and justification brought to you by | |
| // Isaac Z. Schlueter, aka isaacs | |
| // standard style | |
| var a = "ape", | |
| b = "bat", | |
| c = "cat", | |
| d = "dog", |
| #!/usr/bin/env ruby | |
| # Aside from removing Ruby on Rails specific code this is taken verbatim from | |
| # mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome | |
| # - Ryan Florence (http://ryanflorence.com) | |
| # | |
| # Install this hook to a remote repository with a working tree, when you push | |
| # to it, this hook will reset the head so the files are updated | |
| if ENV['GIT_DIR'] == '.' |
| ### | |
| Module dependencies | |
| ### | |
| require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
| require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
| express = require 'express' | |
| app = module.exports = express.createServer() | |
| RedisStore = require 'connect-redis' |
| # MySQL. Versions 4.1 and 5.0 are recommended. | |
| # | |
| # Install the MySQL driver: | |
| # gem install mysql2 | |
| # | |
| # And be sure to use new-style password hashing: | |
| # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| development: | |
| adapter: mysql2 | |
| encoding: utf8 |
| function consumer() { | |
| return new oauth.OAuth( | |
| "https://twitter.com/oauth/request_token", | |
| "https://twitter.com/oauth/access_token", | |
| keys.twitterConsumerKey, | |
| keys.twitterConsumerSecret, | |
| "1.0A", | |
| "http://localhost:3000/sessions/callback", | |
| "HMAC-SHA1" | |
| ); |
| #!upstart | |
| description "clipboard.com app server" | |
| author "Ken Perkins & Mark Dawson (c) 2011" | |
| env NAME=clipboard-app | |
| env APP=clipboard-app.js | |
| env LOGFILE=/home/clipboard/clipboard-app.log | |
| env ERRORFILE=/home/clipboard/clipboard-app-error.log | |
| env HOME="/home/clipboard/node/apps" |
| // | |
| // TransitionController.h | |
| // | |
| // Created by XJones on 11/25/11. | |
| // | |
| #import <UIKit/UIKit.h> | |
| @interface TransitionController : UIViewController |
| DEV_PROVISIONING_UUID = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' | |
| DEV_SIGN = 'Your Signing Name' | |
| ADHOC_PROVISIONING_UUID = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' | |
| ADHOC_SIGN = 'Your Signing Name' | |
| DEV_APP_DEVICE = 'ipad' # or iphone, universal | |
| IPHONE_SDK_VERSION = '5.0' |
| var Person = function(name) { | |
| this.name = name | |
| } | |
| var GreeterMixin = function() { | |
| this.greet = function(name) { | |
| return "Hello " + name + ", I am " + this.name | |
| } | |
| } |