Skip to content

Instantly share code, notes, and snippets.

Piyush Verma meson10

Block or report user

Report or block meson10

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@meson10
meson10 / changeset.md
Last active Nov 22, 2018
Deployment Changeset
View changeset.md
name about
Deploy Changes
Ship a new Update to an existing Deployment

Part [1/5] : Pre-requisities (Delivery Team)

Link to Changeset

Provide a Link to the Changeset that describes the changes to be deployed

View gist:fdca124d2021ab439d06ca70325b05f9
--- FAIL: TestCookiesJarPersistence (0.00s)
main_test.go:186: unable to start cookie server unable to determine port strconv.Atoi: parsing "0.0.0.0:36515": invalid syntax
=== RUN TestEmbeddedClientTimeout
--- FAIL: TestEmbeddedClientTimeout (0.00s)
main_test.go:216: unable to start timeout server unable to determine port strconv.Atoi: parsing "0.0.0.0:36293": invalid syntax
=== RUN TestConcurrentRequestsNotRacyAndDontLeak_FailedRequest
--- FAIL: TestConcurrentRequestsNotRacyAndDontLeak_FailedRequest (0.00s)
main_test.go:234: unable to start server unable to determine port strconv.Atoi: parsing "0.0.0.0:42805": invalid syntax
@meson10
meson10 / htpasswd.py
Last active Mar 17, 2017
Ship this utility instead of installing htpasswd
View htpasswd.py
#!/usr/local/bin/python
"""Replacement for htpasswd"""
# Original author: Eli Carter
import os
import sys
import random
from optparse import OptionParser
# We need a crypt module, but Windows doesn't have one by default. Try to find
@meson10
meson10 / profile.go
Created Nov 13, 2016
Profiling explained
View profile.go
package main
import (
"fmt"
"log"
"os"
"runtime"
"runtime/pprof"
"strconv"
"sync"
View gilmour_race_condition.go
piyush:gilmour-e-go master λ go test --race -v ./...
=== RUN TestMergeHash
--- PASS: TestMergeHash (0.00s)
=== RUN TestMergeMismatch
--- PASS: TestMergeMismatch (0.00s)
=== RUN TestMergePointer
--- PASS: TestMergePointer (0.00s)
=== RUN TestMergeInterface
--- PASS: TestMergeInterface (0.00s)
=== RUN TestMergeInterfacePointer
View syncOnce.go
package main
import (
"log"
"sync"
)
type MyStruct struct {
field int
}
@meson10
meson10 / syncLock.go
Last active Jun 29, 2016
Sync with Lock
View syncLock.go
package main
import (
"log"
"sync"
)
type MyStruct struct {
field int
}
@meson10
meson10 / singleton.go
Created Jun 28, 2016
Go singleton as locks or sync.Once
View singleton.go
package main
import (
"log"
"sync"
)
type MyStruct struct {
field int
}
@meson10
meson10 / cert.sh
Created Jun 17, 2016
Service to coordinate with Azure API and idempotently upload certificates
View cert.sh
#!/bin/sh
set -e
service=$1
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
output="${DIR}/ssh_thumbprint"
cd $DIR
if [[ `azure service cert list | grep -c $service` -eq 0 ]]; then
@meson10
meson10 / null_resource.tf.json
Created Jun 17, 2016
Null resource resource
View null_resource.tf.json
{
"resource": {
"null_resource": {
"ssh_key": {
"triggers": {
"thumbprint": "${file(\"./ssl/ssh_thumbprint\")}"
},
"provisioner": [{
"local-exec": {
"command": "bash ./ssl/cert.sh ${azure_hosted_service.terraform.name}"
You can’t perform that action at this time.