Skip to content

Instantly share code, notes, and snippets.

@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!
@guymac
guymac / mp3playlist
Last active June 23, 2023 11:28
Example of using HTML5 as a music playlist. This html would be put in a directory and all the mp3 files that it references in a subdirectory called mp3. The whole thing can be written to CD-R where this html serves as the music playing application (and MP3 CD-Rs will autoplay in most non-interactive devices).
<html>
<head>
<title>EDM Favorites Volume 4</title>
<script type="text/javascript">
//<![CDATA[
(function(){
// audioElement = HTML5 Audio
AudioHandler = function(audioElement)