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 | |
table=$1 | |
filename=$2 | |
cqlsh -e "COPY $table TO './$filename' WITH HEADER = true;" |
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
func ExamplePrintToPDF() { | |
ctx, cancel := chromedp.NewContext(context.Background()) | |
defer cancel() | |
var buf []byte | |
if err := chromedp.Run(ctx, | |
chromedp.Navigate(`https://godoc.org/github.com/chromedp/chromedp`), | |
chromedp.ActionFunc(func(ctx context.Context) error { | |
var err error | |
buf, _, err = page.PrintToPDF(). |
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} |
Below is a list of helpful commands to run a successful migration of Subversion to Git.
svn log --quiet https://svn-server.example.com/repos/my_repo | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/ //g' | sort | uniq > svnauthors.txt
# convert the `svnauthors.txt` to proper format (name, email) in `authors.txt`
git svn clone --prefix="" --authors-file="authors.txt" -s https://svn-server.example.com/repos/my_repo
java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git --force
git remote add origin ssh://[email protected]/my_username/my_repo.git
git push --all
git push --tags
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
[Unit] | |
Description=Sonatype Nexus | |
After=centrifydc.service | |
Requires=centrifydc.service | |
[Service] | |
User=user | |
Group=group | |
Type=forking | |
PIDFile=/path/to/nexus-2.11.4-01-bundle/nexus-2.11.4-01/bin/jsw/linux-x86-64/nexus.pid |
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/sh | |
curl -O http://repo.continuum.io/archive/Anaconda3-4.0.0-Linux-x86_64.sh | |
chmod u+x Anaconda3-4.0.0-Linux-x86_64.sh | |
./Anaconda3-4.0.0-Linux-x86_64.sh -b -p /opt/anaconda3 | |
export PATH=/opt/anaconda3/bin:$PATH | |
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash - | |
yum install nodejs -y | |
npm install -g configurable-http-proxy | |
pip install jupyterhub |
NewerOlder