API | Status Codes |
---|---|
[Twitter][tw] | 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504 |
[Stripe][stripe] | 200, 400, 401, 402, 404, 429, 500, 502, 503, 504 |
[Github][gh] | 200, 400, 422, 301, 302, 304, 307, 401, 403 |
[Pagerduty][pd] | 200, 201, 204, 400, 401, 403, 404, 408, 500 |
[NewRelic Plugins][nr] | 200, 400, 403, 404, 405, 413, 500, 502, 503, 503 |
[Etsy][etsy] | 200, 201, 400, 403, 404, 500, 503 |
[Dropbox][db] | 200, 400, 401, 403, 404, 405, 429, 503, 507 |
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
#!/bin/bash -ex | |
REPO_NAME=${PWD##*/} | |
TARGET_ORG="jenkinsci" | |
#TODO: fetch from GitHib API | |
#TODO: if no, process parameters correctly | |
GITHUB_PR_NUMBER=${1} | |
FROM_USER=${2} | |
BRANCH=${3} |
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
#!/bin/bash | |
# | |
# Copies certain kinds of known files and directories from a given Jenkins master directory | |
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em. | |
# | |
set -ex | |
if [ $# -ne 2 ]; then | |
echo usage: $0 root_dir jenkins_master |
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
#!/bin/bash | |
# | |
# Starts up a MongoDB replica set | |
# | |
# There is a lot of documentation about replica sets: | |
# | |
# http://docs.mongodb.org/manual/reference/replica-configuration/ | |
# http://docs.mongodb.org/manual/administration/replica-sets/ | |
# | |
# To read data from a SECONDARY, when in the client, use: |
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
default.target.wants/ | |
nexus |
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 article was a huge help: http://evadeflow.com/2010/09/easy_install-through-a-proxy-server/ | |
Basically, what I learned is that you need to set both the http_proxy and https_proxy for setuptools easy_install to work. | |
It's worth mentioning I'm using this version of Python 2.7 on Windows 7 64-bit: http://www.activestate.com/activepython | |
From the Windows command prompt, I first set the two environment variables: | |
c:\> set http_proxy=<user>:<password>@<proxy_ip_address>:<port> |
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
#' Simplified loading and installing of packages | |
#' | |
#' This is a wrapper to \code{\link{require}} and \code{\link{install.packages}}. | |
#' Specifically, this will first try to load the package(s) and if not found | |
#' it will install then load the packages. Additionally, if the | |
#' \code{update=TRUE} parameter is specified it will check the currently | |
#' installed package version with what is available on CRAN (or mirror) and | |
#' install the newer version. | |
#' | |
#' @param pkgs a character vector with the names of the packages to load. |
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
# Looks in the CRAN archive for the specified package and version. If | |
# the specified version is NULL or the same as the most recent version | |
# of the package, this function simply calls install.packages(). Otherwise, | |
# it looks at the list of archived source tarballs and tries to install | |
# an older version instead. | |
install.package.version <- function( | |
package, | |
version = NULL, | |
repos = getOption('repos'), |
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
require 'sinatra' | |
require 'mongoid' | |
require 'json' | |
require "sinatra/reloader" if development? | |
Mongoid.load!("mongoid.yml") | |
class Price | |
include Mongoid::Document |