The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| # url.coffee | |
| # by Aseem Kishore ( https://github.com/aseemk ), under MIT license | |
| # | |
| # A simplified wrapper around the native 'url' module that returns "live" | |
| # objects: updates to properties are reflected in related properties. E.g. | |
| # updates to the `port` property will be reflected on the `host` property. | |
| # | |
| # The public API and behavior are pretty close to the native 'url' module's: | |
| # http://nodejs.org/docs/latest/api/url.html Currently lacking / known issues: | |
| # |
| window.HAL = {} | |
| class HAL.Model extends Backbone.Model | |
| constructor: (attrs) -> | |
| super @parse(_.clone attrs) | |
| parse: (attrs = {}) -> | |
| @links = attrs._links || {} | |
| delete attrs._links | |
| @embedded = attrs._embedded || {} |
| #!/usr/bin/env bash | |
| curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz | |
| mkdir vim && tar xzvf vim.tar.gz -C vim | |
| export PATH=$PATH:/app/vim/bin |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| // Wrapping asynchronous functions | |
| // This wrapper is implemented with callbacks | |
| // i is the index of the callback in the parameter list | |
| // isFuture is a reserved parameter - do not pass it | |
| function wrapper1(fn, i, isFuture) { | |
| return function wrapped() { | |
| var cb = arguments[i]; | |
| if (!isFuture) console.log("WRAPPER1 BEFORE CALL: " + fn.name); | |
| if (cb == null) return wrapper1(fn.apply(this, arguments), 0, true); | |
| arguments[i] = function(err, result) { |
| var svg = document.getElementById('graph'), | |
| xml = new XMLSerializer().serializeToString(svg), | |
| data = "data:image/svg+xml;base64," + btoa(xml), | |
| img = new Image() | |
| img.setAttribute('src', data) | |
| document.body.appendChild(img) |
| #!/bin/cat |