Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| const concurrency = 3 |
| // Package deepcopy provides a function for deep copying map[string]interface{} | |
| // values. Inspired by the StackOverflow answer at: | |
| // http://stackoverflow.com/a/28579297/1366283 | |
| // | |
| // Uses the golang.org/pkg/encoding/gob package to do this and therefore has the | |
| // same caveats. | |
| // See: https://blog.golang.org/gobs-of-data | |
| // See: https://golang.org/pkg/encoding/gob/ | |
| package deepcopy |
| #!/usr/bin/env bash | |
| # REF: https://github.com/cloudflare/cfssl | |
| # Change working directory | |
| cd -- "$( | |
| dirname "${0}" | |
| )" || exit 1 | |
| readonly CA_ROOT_CERT_KEY="ca-root" |
| package cache | |
| import ( | |
| "crypto/sha256" | |
| "encoding/json" | |
| "fmt" | |
| "os" | |
| "sync" | |
| "time" | |
| ) |
| /** | |
| * Created by milechainsaw on 7/19/16. | |
| * | |
| * Exponential backoff callback for Retrofit2 | |
| * | |
| */ | |
| public abstract class BackoffCallback<T> implements Callback<T> { | |
| private static final int RETRY_COUNT = 3; | |
| /** | |
| * Base retry delay for exponential backoff, in Milliseconds |
| package main | |
| import ( | |
| "errors" | |
| "log" | |
| "github.com/libgit2/git2go" | |
| ) | |
| func checkoutBranch(repo *git.Repository, branchName string) error { | |
| checkoutOpts := &git.CheckoutOpts{ |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| // Import all | |
| import Rx from "rxjs/Rx"; | |
| Rx.Observable | |
| .interval(200) | |
| .take(9) | |
| .map(x => x + "!!!") | |
| .bufferCount(2) | |
| .subscribe(::console.log); |
| func (repo *Repo) Pull() error { | |
| branch, err := repo.Branch() | |
| if err != nil { | |
| return err | |
| } | |
| // Get the name | |
| name, err := branch.Name() | |
| if err != nil { | |
| return err |
| // API stuff like routing, etc... | |
| var express = require('express') | |
| // To get the meta data, custom | |
| var getMetaData = require("./meta.js") | |
| // Create express api and route | |
| express().get('/', function(req, res) { | |
| // Get the query parameter url |