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" | |
"os" | |
"os/signal" | |
"strconv" | |
"syscall" | |
"github.com/hashicorp/serf/serf" |
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
Image debian 9 w/ curl,git :buildpack-deps:stretch-scm |
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
http://container-solutions.com/write-terraform-provider-part-1/ |
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
# Configure the OpenStack Provider | |
provider "openstack" { | |
# user_name = "" OS_USERNAME sourced from openrc.sh file will be used | |
# password = "" OS_PASSWORD sourced from openrc.sh file will be used | |
tenant_name = "TENANT_NAME" | |
auth_url = "https://auth.cloud.ovh.net/v2.0/" | |
} | |
# Create a key pair | |
resource "openstack_compute_keypair_v2" "test-keypair" { |
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
http://www.kaihag.com/https-and-go/ | |
https://gist.github.com/artyom/6897140 |
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 getNextPage(headers http.Header) string { | |
linkHeader := headers.Get("Link") | |
if linkHeader != "" { | |
links := strings.Split(linkHeader, ",") | |
for _, link := range links { | |
if strings.Contains(link, "rel=\"next\"") { | |
r, _ := regexp.Compile("<(.*)>.*") | |
s := r.FindStringSubmatch(link) | |
if len(s) == 2 { | |
return s[1] |
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
import java.util.Timer; | |
import java.util.TimerTask; | |
/** | |
* Created by fsamin on 09/12/15. | |
*/ | |
public class MyTimer { | |
private final Timer t = new Timer(); | |
public TimerTask schedule(final Runnable r, long delay) { |
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
var gulp = require('gulp'), | |
path = require('path'), | |
tap = require('gulp-tap'), | |
exec = require('child_process').exec; | |
var serverPaths = { | |
ALL_GO: ['./server/**/*.go'], | |
}; | |
gulp.task('go-fmt', function() { |
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
echo "*** 1) Prepare environment" | |
docker pull node | |
docker run --name=nodejs node npm -version | |
docker commit nodejs docktor-ic | |
docker rm nodejs | |
echo "*** 2) Clone git repository" | |
docker run --name=docktor-ic-checkout --workdir=/opt docktor-ic git clone https://github.com/docktor/docktor.git | |
docker commit docktor-ic-checkout docktor-ic-checkout | |
docker rm docktor-ic-checkout | |
echo "*** 3) Install dependencies" |