Skip to content

Instantly share code, notes, and snippets.

resources:
- name: my-code-pr
type: pull-request
check_every: 24h
webhook_token: ((webhook-token))
source:
repository: user/my-code
access_token: ((github-access-token))
v3_endpoint: https://github.com/api/v3/
@mdb
mdb / gist:5913429
Created July 2, 2013 21:41
tmux.conf
# Set pane divider
set -g pane-border-bg white
set -g pane-border-fg white
set -g pane-active-border-bg white
set -g pane-active-border-fg white
@mdb
mdb / some_file_spec.js
Created June 13, 2013 18:37
Example teabag/AMD spec file
// Define your spec file:
define('some/path/some_file_spec',
[
// The file you want to test:
'some/path/some_file'
], function(
SomeFile) {
describe("SomeFile", function () {
it("exists", function () {
@mdb
mdb / tag_release
Created February 19, 2013 01:12
How to tag a release in git.
git tag -a v0.0.1 -m "Version 0.0.1"
git push --tags
var DirectoryView = Backbone.View.extend({
el: $("#recordings"),
initialize: function () {
this.collection = new Directory(contacts);
this.render();
},
render: function () {
var that = this;
@mdb
mdb / gist:4288296
Last active October 25, 2022 12:17
How to Amend a Commit
# View the log to find the commit you want to edit:
git log
# Quit out of the log
q
# Rebase from the commit you want to edit, in interactive mode:
git rebase SOME_COMMIT_ID^ --interactive
# This will open an interactive menu in Vi
@mdb
mdb / gist:4206372
Created December 4, 2012 17:11
How to properly version bump a Node.js module
npm version patch -m "Version %s"
git push
git push --tags
npm publish
url: http://phlapi.com:5984/v1//phl_bike_network/all
params: {}
response.headers: { server: 'CouchDB/1.0.2 (Erlang OTP/R14B)',
date: 'Thu, 04 Oct 2012 19:51:50 GMT',
'content-type': 'text/plain;charset=utf-8',
'content-length': '1938',
'cache-control': 'must-revalidate' }
{ error: 'render_error',
reason: 'function raised error: (new TypeError("req.headers.Accept is undefined", "", 11)) \nstacktrac
e: ([object Object],[object Object])@:11\nrunList(function (head, req) {var row, out, sep = "\\n";if (re
var placeholderElems = $('[data-test]');
var placeholderAttr = 'data-test';
var placeholderClass = 'placeholder';
placeholderElems.focus(function() {
var input = $(this);
if (input.val() === input.attr(placeholderAttr)) {
input.val('');
input.removeClass(placeholderClass);
module.exports = function(app) {
app.get('/', function(req, res){
console.log(__dirname)
res.render('index', {
title: '2012 PollWatcher'
});
});
app.get('/:state', function(req, res){
console.log(__dirname)