This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
enum type { | |
NIL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Store messages in a Maildir into a couchdb database.""" | |
import couchdb | |
from mailbox import Maildir | |
from optparse import OptionParser | |
import os | |
from pprint import pprint | |
import sys | |
from uuid import uuid4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules: Makefile | |
@rm -rf $@ | |
@mkdir -p $@ | |
$(call get_src_module,$@,https://github.com/tastapod/node-imap/tarball/bruno-merge) | |
$(call get_npm_module,$@,log,1.2.0) | |
$(call get_npm_module,$@,connect,1.8.2) | |
# We have to manually fetch connect's dependencies | |
$(call get_npm_module,$@,qs,0.4.0) | |
$(call get_npm_module,$@,mime,1.2.4) | |
$(call get_npm_module,$@,formidable,1.0.8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME := $(shell node -e "console.log(JSON.parse(require('fs').readFileSync('package.json', 'utf8')).name)") | |
VERSION := $(shell node -e "console.log(JSON.parse(require('fs').readFileSync('package.json', 'utf8')).version)") | |
TARBALL := $(NAME)-$(VERSION).tgz | |
npm-publish: | |
@rm -Rf package | |
@mkdir package | |
@cp -R lib package/lib | |
@cp package.json package | |
@tar czf $(TARBALL) package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an example resource file for rTorrent. Copy to | |
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to | |
# uncomment the options you wish to enable. | |
# Maximum and minimum number of peers to connect to per torrent. | |
min_peers = 1 | |
max_peers = 100 | |
# Same as above but for seeding completed torrents (-1 = same as downloading) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
package main | |
import ( | |
"fmt" | |
"golang.org/x/crypto/ssh" | |
) | |
const privateKey = `content of id_rsa` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
""" | |
import csv | |
import requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/env ruby | |
# Acquires a shared lock on a SQLite database file and copies it to a backup | |
# usage: backup-db.rb DBFILE.db BACKUPFILE.db | |
# author: William Benton ([email protected]) | |
# Public domain. | |
require 'sqlite3' | |
require 'fileutils' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# disappear the annoying ANSI codes for PowerShell and cmd | |
if RUBY_PLATFORM =~ /mswin|mingw/i | |
ActiveSupport::LogSubscriber.colorize_logging = false | |
end |
OlderNewer