Skip to content

Instantly share code, notes, and snippets.

@doyle
doyle / gist:92b0b34cd4804d237ed9661e20e33e5d
Created Oct 17, 2016
Use curl to upload a file to a S3 pre-signed url
View gist:92b0b34cd4804d237ed9661e20e33e5d
curl -X PUT -T test_s3.txt -L "https://your-bucket.s3.amazonaws.com/url-stuff"
@datagrok
datagrok / README.md
Last active Mar 8, 2021
What happens when you cancel a Jenkins job
View README.md

When you cancel a Jenkins job

Unfinished draft; do not use until this notice is removed.

We were seeing some unexpected behavior in the processes that Jenkins launches when the Jenkins user clicks "cancel" on their job. Unexpected behaviors like:

  • apparently stale lockfiles and pidfiles
  • overlapping processes
  • jobs apparently ending without performing cleanup tasks
  • jobs continuing to run after being reported "aborted"
@dmitshur
dmitshur / gist:6927554
Last active Apr 5, 2021
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.
View gist:6927554

WARNING: This gist was created in 2013 and targets the legacy GOPATH mode. If you're reading this in 2021 or later, you're likely better served by reading https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.

$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
View gcd.sh
# Bash function to cd to a package on GOPATH (inspiration for that
# from... elsewhere; I can't remember now unfortunately), and bash
# completion for the aforementioned (my own work). Have at it.
# -- Gavin Panella, 2013
gcd() {
local package="$1"
local pdir="$(go list -e -f '{{.Dir}}' "${package}")"
if [ -z "${pdir}" ]
then
@cweekly-yottaa
cweekly-yottaa / GA-Perf-Data-JS.html
Created Feb 22, 2011
Google Analytics JavaScript enhancement: Push Web Timing Performance Data into GA custom vars
View GA-Perf-Data-JS.html
<html>
<head>
<script type="text/javascript">var yoHeadTime = new Date().getTime();</script>
</head>
<body>
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
(function() {
var reportTimeSegment = function(index, name, start, end, scope) {