Skip to content

Instantly share code, notes, and snippets.

View robertkowalski's full-sized avatar

Robert Kowalski robertkowalski

View GitHub Profile
var request = require('request')
var testDbName = 'foobar123' + Math.floor(Math.random() * 10000)
var cookieJar = request.jar()
request({
jar: cookieJar,
method: 'POST',
form: {
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIugg/Fexmf1awaEar9QdYWJdiNEajjnvOoGYGlYRmbGrJ3WJK+7q6Ebzff7ZfhH8uFvyRfCwdE4oJW1M1TQPnxgkzCfs8zAqjwPAQJLEUPBLLh9RFMEHHLp02DLvhmnWYtIx0DOl03/rq+XS90WYacvMlAXNMaQQukyNc4jvB2l4Su6qa89sBq9vz5glrD8v1l93/nBucVvNvEmfbOGuSsi47hGDkezsISsl37LBmNKLR8+gQQMVzOZQcfLxycACH6q98K2oli76PIMh305z/5BLOrlrcUX7JyoPtP304vRjusU0orITQQqeeuO29gg81+IfwLf+V6Afr1A7RbyDH robert@tequila-work
@robertkowalski
robertkowalski / pr.md
Last active August 29, 2015 14:08 — forked from piscisaureus/pr.md

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 = git@github.com: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:

@robertkowalski
robertkowalski / Vagrantfile
Created May 23, 2014 18:48
My CouchDB Vagrant File
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV['BOX_NAME'] || "ubuntu"
BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64.box"
AWS_REGION = ENV['AWS_REGION'] || "us-east-1"
AWS_AMI = ENV['AWS_AMI'] || "ami-d0f89fb9"
Vagrant::Config.run do |config|
# Setup virtual machine box. This VM configuration code is always executed.
@robertkowalski
robertkowalski / npm-registry-licenses.txt
Created November 23, 2013 22:31
The licenses in the npm-registry from their package.json, from the latest version of each module 23.11.2013
The licenses in the npm-registry from their package.json, from the latest version of each module
23.11.2013
[ { key: 'undefined', value: 27785 },
{ key: 'MIT', value: 20811 },
{ key: 'BSD', value: 5240 },
{ key: 'BSD-2-Clause', value: 621 },
{ key: 'Apache 2.0', value: 263 },
{ key: 'GPL', value: 233 },
@robertkowalski
robertkowalski / gist:4206422
Created December 4, 2012 17:17
adding meta tags to head with javascript
var meta=document.createElement('meta');
meta.name='viewport';
meta.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0');
document.getElementsByTagName('head')[0].appendChild(meta);
@robertkowalski
robertkowalski / scraper.js
Created July 18, 2012 14:38
node.io scraper for my blog
var nodeio = require('node.io'),
options = {timeout: 10};
exports.job = new nodeio.Job(options, {
input: false,
run: function (keyword) {
this.getHtml('http://robert-kowalski.de', function (err, $) {
var titles = [];
$('h1.entry-title')
.each(function(element) {
@robertkowalski
robertkowalski / plusone-links.js
Created January 8, 2012 22:27 — forked from robin-drexler/plusone-links.js
show plus one count of links