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 proxy | |
import ( | |
"io" | |
"net" | |
"net/http" | |
"time" | |
) | |
func transfer(destination io.WriteCloser, source io.ReadCloser) { |
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 ( | |
"flag" | |
"fmt" | |
"os" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
"k8s.io/client-go/kubernetes" | |
"k8s.io/client-go/rest" | |
"k8s.io/client-go/tools/clientcmd" |
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 ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
var ( |
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 ( | |
"bufio" | |
"fmt" | |
"os" | |
"strings" | |
"time" | |
"golang.org/x/net/context" |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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 version of the server protects all shared data within a manager | |
// goroutine that accepts commands using a channel. | |
// | |
// Eli Bendersky [http://eli.thegreenplace.net] | |
// This code is in the public domain. | |
package main | |
import ( | |
"fmt" | |
"log" |
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
kubectl config set-cluster default-cluster --server=https://master_ip --certificate-authority=ssl/ca.pem | |
kubectl config set-credentials default-admin --certificate-authority=ssl/ca.pem --client-key=ssl/admin-key.pem --client-certificate=ssl/admin.pem | |
kubectl config set-context default-system --cluster=default-cluster --user=default-admin | |
kubectl config use-context default-system | |
# obviously you need the CA used to bootstrap your cluster and all the certificates |
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
function brew_check() { | |
brew $2 info $1 | grep -q "Not installed" | |
} | |
function brew_install() { | |
tool=$(echo $1 | awk '{print $1}') | |
cask=$(echo $1 | awk '{print $2}') | |
brew_check $tool $cask | |
[[ $? -eq 0 ]] && echo -e "Installing $tool..." && brew $cask install $tool |
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
/* | |
* simpleprocess.cpp | |
* | |
* Created on: Jun 26, 2015 | |
* Author: Marco Massenzio | |
*/ | |
#include <iostream> | |
#include <process/dispatch.hpp> |
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
Host work.github.com | |
HostName github.com | |
User WORK_GITHUB_USERNAME | |
PreferredAuthentications publickey | |
IdentityFile ~/.ssh/id_work_rsa | |
IdentitiesOnly yes | |
Host personal.github.com | |
HostName github.com | |
User PERSONAL_GITHUB_USERNAME |