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
require 'bundler'
Bundler.require
class Stream < Goliath::API
use Goliath::Rack::Params
use Goliath::Rack::Render, 'json'
use Goliath::Rack::Heartbeat
def response(env)
type publisher struct {
connPool redis.Pool
}
WritePool := &redis.Pool{
MaxIdle: 5000,
IdleTimeout: 240 * time.Second,
Dial: func() (redis.Conn, error) {
c, err := redis.Dial("tcp", ":6379")
if err != nil {
package main
var (
Config config.Config
)
func init() {
yamlString, err := ioutil.ReadFile("./config.yaml")
cfg, err := config.ParseYaml(string(yamlString))
import "unused"
// This declaration marks the import as used by referencing an
// item from the package.
var _ = unused.Item // TODO: Delete before committing!
@webdev
webdev / stub.go
Created November 4, 2013 23:47 — forked from ClayShentrup/stub.go
package main
import (
"fmt"
"reflect"
"time"
)
func main() {
stubPrototype := func(in []reflect.Value) []reflect.Value {
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"