Skip to content

Instantly share code, notes, and snippets.

@datagrok
datagrok / README.md
Last active November 20, 2023 22:00
What happens when you cancel a Jenkins job

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 September 17, 2023 07:35
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.

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!
@doyle
doyle / gist:92b0b34cd4804d237ed9661e20e33e5d
Created October 17, 2016 19:51
Use curl to upload a file to a S3 pre-signed url
curl -X PUT -T test_s3.txt -L "https://your-bucket.s3.amazonaws.com/url-stuff"
# check device is responding
AT
# verbose logging
AT+LOG=DEBUG
# switch to AU915
AT+DR=AU915
# before 2022-11-17
@cweekly-yottaa
cweekly-yottaa / GA-Perf-Data-JS.html
Created February 22, 2011 21:35
Google Analytics JavaScript enhancement: Push Web Timing Performance Data into GA custom vars
<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) {
@allenap
allenap / gcd.sh
Last active December 30, 2016 07:11
# 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