Updated for Rails 4.0.0+
-
Set up the
bowergem. -
Follow the Bower instructions and list your dependencies in your
bower.json, e.g.// bower.json
{
| // Types for the result object with discriminated union | |
| type Success<T> = { | |
| data: T; | |
| error: null; | |
| }; | |
| type Failure<E> = { | |
| data: null; | |
| error: E; | |
| }; |
Updated for Rails 4.0.0+
Set up the bower gem.
Follow the Bower instructions and list your dependencies in your bower.json, e.g.
// bower.json{
| require 'digest/md5' | |
| namespace :git do | |
| GITHUB_COMMIT_URL = "https://github.com/path/to/your/repo/commit/" # <= set me | |
| # Before doing a deploy, I like to check GitHub's branch list | |
| # but I wanted to be able to save it in a Lighthouse message | |
| COMPARE_FOR = { | |
| 'production' => 'origin/production..origin/release', |
| Vagrant::Config.run do |config| | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| config.vm.box = "debian_squeeze_32" | |
| # The url from where the 'config.vm.box' box will be fetched if it | |
| # doesn't already exist on the user's system. | |
| config.vm.box_url = "http://mathie-vagrant-boxes.s3.amazonaws.com/debian_squeeze_32.box" | |
| # Assign this VM to a host only network IP, allowing you to access it via the IP. | |
| config.vm.network "33.33.33.10" |
| $ git clone github:lenary/guides.git | |
| Cloning into guides... | |
| remote: Counting objects: 255, done. | |
| remote: Compressing objects: 100% (216/216), done. | |
| remote: Total 255 (delta 111), reused 163 (delta 35) | |
| Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done. | |
| Resolving deltas: 100% (111/111), done. | |
| $ cd guides | |
| $ git remote -v |
| #!/bin/bash | |
| # have to hand install this one sorry http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.tar.gz | |
| if [ "$1" == "cleanup" ]; then | |
| echo "Cleaning up old luajit install" | |
| cd /usr/local/share | |
| sudo rm -rf lua luajit-2.0.0-beta6 |
| require 'v8' | |
| require 'openssl' | |
| class Module | |
| def [](name) | |
| self.const_get(name) | |
| end | |
| end |
| $ sudo su - | |
| # mkdir /etc/resolver | |
| # cat > /etc/resolver/test | |
| nameserver 127.0.0.1 | |
| port 2155 | |
| ^D | |
| ^D | |
| $ brew install dnsmasq | |
| $ dnsmasq --port=2155 --no-resolv --address=/.test/127.0.0.1 | |
| $ ping foo.test |
| var http = require('http'), | |
| sys = require('sys'), | |
| fs = require('fs'), | |
| url = require('url'), | |
| queryString = require('querystring'), | |
| proxy = require('./htmlfiltre'), | |
| YUI = require('yui3').YUI; | |
| http.createServer(function(req, res) { | |
| proxy.htmlFiltre(req, { foreignHost: 'www.instapaper.com', foreignHostPort: 80 }, function (status, buffer, request, response, loc) { |
| sys: require 'sys' | |
| net: require 'net' | |
| fs: require 'fs' | |
| Buffer: require('buffer').Buffer | |
| Schema: require('protobuf_for_node').Schema | |
| schema: new Schema(fs.readFileSync('riak.desc')) | |
| types: ['RpbErrorResp', 'RpbPingReq', 'RpbPingResp', 'RpbGetClientIdReq', | |
| 'RpbGetClientIdResp', 'RpbSetClientIdReq', 'RpbSetClientIdResp', | |
| 'RpbGetServerInfoReq', 'RpbGetServerInfoResp', 'RpbGetReq', 'RpbGetResp'] |