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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and | |
// a slice of URLs found on that page. |
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 | |
PROMPT="\n$ " | |
DELAY_COMMENT_CHAR="0.1s" | |
DELAY_COMMENT="1s" | |
DELAY_RUN="3s" | |
GRAY="\033[1;30m" | |
LIGHT_GRAY="\033[0;37m" | |
CYAN="\033[0;36m" |
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
# Configuration based on | |
# http://www.andrews-corner.org/linux/abcde/index.html and | |
# http://www.andrews-corner.org/linux/abcde/getalbumart.html | |
LOWDISK=n | |
CDDBMETHOD=musicbrainz | |
ACTIONS=cddb,read,getalbumart,encode,tag,move,playlist,clean | |
OUTPUTTYPE="flac,mp3" |
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
### MESOS | |
yum -y update | |
for url in \ | |
#https://get.docker.com/rpm/1.7.1/centos-7/RPMS/x86_64/docker-engine-1.7.1-1.el7.centos.x86_64.rpm \ | |
http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm \ | |
https://tstclair.fedorapeople.org/mesos/centos7/mesos-0.21.0-1.SNAPSHOT.3133734.el7.centos.x86_64.rpm \ | |
https://tstclair.fedorapeople.org/mesos/centos7/python-mesos-0.21.0-1.SNAPSHOT.3133734.el7.centos.x86_64.rpm \ | |
https://tstclair.fedorapeople.org/mesos/centos7/mesos-devel-0.21.0-1.SNAPSHOT.3133734.el7.centos.x86_64.rpm \ | |
https://tstclair.fedorapeople.org/mesos/centos7/mesos-java-0.21.0-1.SNAPSHOT.3133734.el7.centos.x86_64.rpm \ | |
; |
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
# We do it in a Docker container | |
docker run -it --name svn_build debian:jessie | |
# Set HTTP proxy if required | |
export http{,s}_proxy=http://proxy_host:proxy_port | |
# Install all the dependencies | |
apt-get update | |
apt-get install curl bzip2 gcc autoconf libtool make python |
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
# SSH to GitHub appliance and go to your working directory where you do migrations | |
# Type your Subversion username + Enter | |
read SVN_USER | |
# type your Subversion password + Enter | |
read SVN_PASSWORD | |
# type your GitHub username + Enter | |
read GIT_USER | |
# type your GitHub **Personal Access Token** + Enter | |
read GIT_TOKEN |
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
// Explict call parameters | |
def containerBuildAndPublish1(image, tag, dockerRegistry, dockerRegistryCredsId) { | |
//IMPLEMENTATION USAGE EXAMPLE | |
println "Building ${image}:${tag} and publishing to ${dockerRegistry} using creds ${dockerRegistryCredsId}" | |
} | |
// PIPELINE USAGE EXAMPLE: Explict call parameters | |
containerBuildAndPublish1('myimage', 'latest', 'my.docker.registry:1234', 'jenkins-docker') | |
containerBuildAndPublish1 'myimage', 'latest', 'my.docker.registry:1234', 'jenkins-docker' |
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
const cookieSecret = process.env.COOKIE_SECRET || 'secret' | |
const cookieName = process.env.COOKIE_NAME || 'GitHubAuthenticated' | |
const githubHost = process.env.GHE_HOST || 'https://github.com' | |
const githubApiUrl = process.env.GHE_API_URL || 'https://api.github.com' | |
const clientId = process.env.CLIENT_ID | |
const clientSecret = process.env.CLIENT_SECRET | |
const userAgent = 'My-App' | |
const express = require('express') | |
const app = express() |
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
const express = require('express') | |
const proxy = require('http-proxy-middleware') | |
const app = express() | |
app.use('/xxx', proxy('/xxx', { | |
target: 'http://localhost:8443', | |
changeOrigin: true, | |
ws: true, | |
pathRewrite: { |
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
terraform plan -no-color 2>&1 \ | |
| sed -E -e 's/^([[:space:]]+)([-+#])/\2\1/g' -e 's/^([[:space:]]+)~/!\1/g' |
OlderNewer