This file contains hidden or 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
deciphernow/odrive:latest: | |
dockerng.image_present: | |
- insecure_registry: True | |
- name: deciphernow/odrive:latest |
This file contains hidden or 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
// NewOpenSSLTransport returns a TCP connection establish with OpenSSL. | |
func NewOpenSSLTransport(trustPath, certPath, keyPath, host, port string, dialOpts *OpenSSLDialOptions) (*openssl.Conn, error) { | |
// Default to flag 0 | |
if dialOpts == nil { | |
dialOpts = &OpenSSLDialOptions{} | |
} | |
ctx, err := openssl.NewCtx() | |
if err != nil { |
This file contains hidden or 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
npm_install() | |
{ | |
cd $PROJECT_HOME # package.json in here | |
if npm install | |
then | |
return 0 | |
else |
This file contains hidden or 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 performUpload(path string) { | |
fmt.Println("uploading:", path) | |
// call this in a goroutine from the main service UploadToS3 | |
creds := credentials.NewStaticCredentials(awsAccessKeyID, secretAccessKey, "") | |
// TODO extract this into a config provider | |
awsConfig := &aws.Config{ | |
Credentials: creds, | |
Region: "us-east-1", | |
} |
This file contains hidden or 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
// ReportExporter Contains required methods for extracting csv data from SQL queries | |
type ReportExporter interface { | |
FromSqlRow(*sql.Rows) error | |
ToStrings() []string | |
} | |
// Report A type for holding metadata to instantiate the right csv schema as well | |
// as write the correct output filename | |
type Report struct { | |
SQL string |
This file contains hidden or 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 client | |
import ( | |
"encoding/xml" | |
"io" | |
"github.com/paulrosania/go-charset/charset" | |
_ "github.com/paulrosania/go-charset/data" | |
) |
This file contains hidden or 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
/* | |
* spec parameter is some JSON object with all the params you need | |
*/ | |
function constructor(spec) { | |
var that = other_constructor(spec), | |
member, |
This file contains hidden or 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 "fmt" | |
type IndentationStack []([]string) // type to represent a slice of slice-of-string | |
// can be written like [][]string, i think, but parens make it more clear | |
func main() { | |
var stack IndentationStack | |
stack = make([]([]string), 4) // initialize a slice of slices, length 4, inner slices have length 0! |
This file contains hidden or 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
/* | |
* For posterity, since I'm always looking this up. | |
*/ | |
private void EnsureListingIsVisble(string key) | |
{ | |
// turn off 2 + 8 bits | |
Listing listing = ListingsToAuditDictionary[key]; | |
listing.IDX = listing.IDX ^ (int)ListingIdxEnum.NotSignedInNoListing; // 2 |