Skip to content

Instantly share code, notes, and snippets.

View webdev's full-sized avatar
💭
Exploring Awesomenesss

George Blazer webdev

💭
Exploring Awesomenesss
  • San Francisco, CA
View GitHub Profile
root@prod-mysql-10:/var/lib/mysql/backup# !482
innobackupex --use-memory=500M --ibbackup xtrabackup_51 --apply-log .
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
IMPORTANT: Please check that the apply-log run completes successfully.
RUN mkdir -p /var/log/supervisor
RUN apt-get install -y supervisor
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
supervisor.conf
[supervisord]
nodaemon=true

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

#!/usr/bin/env ruby
require 'rubygems'
require 'bundler'
require 'fileutils'
require 'net/http'
require 'net/https'
require 'uri'
TMP_DIR = "/tmp/gems"

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@webdev
webdev / gist:ee2889756adb8c89e53e
Last active August 29, 2015 14:06
Dind (plugin container pattern)
docker run -p 8080:8080 -v /data/jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) --privileged -u root jenkins
# Use user `root`
@webdev
webdev / gist:e3398cde0c2895f2fe66
Created October 16, 2014 20:05
Cat file into container
docker run --rm -i --volumes-from ssh -w /root/.ssh busybox sh -c 'cat > id_rsa.pub' < ~/.ssh/id_rsa
type loggingResponseWriter interface {¬
+ ▸ http.ResponseWriter¬
+ ▸ Status() int¬
+ ▸ Size() int¬
+ }¬
+ ¬
func Log(handler http.Handler) http.Handler {¬
▸ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {¬
~ ¬
~ ▸ ▸ logger := &loggingResponseWriter{w: w}¬
@webdev
webdev / sse.go
Last active August 29, 2015 14:14 — forked from ismasan/sse.go
package main
import (
"fmt"
"log"
"net/http"
"time"
)
// Example SSE server in Golang.
@webdev
webdev / gist:7e24ea6235cea6c2bffe
Created July 13, 2015 21:31
Self-signed Certificate
# https://gist.github.com/jessedearing/2351836
function check_ssl_cert() {
local hostname=$1
local ssl_dir=/etc/travis/ssl
local ssl_name=${hostname//./_}
local ssl_path=$ssl_dir/$ssl_name
mkdir -p $ssl_dir