This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.
🤦♂️
This file contains 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
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
/* tabs on bottom of window */ | |
#navigator-toolbox { -moz-box-ordinal-group: 10; } | |
#TabsToolbar { -moz-box-ordinal-group: 10; } | |
#PopupAutoCompleteRichResult { | |
margin-top: -35vh; | |
/* | |
position: fixed; | |
bottom: 74px; |
This file contains 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
#!/usr/bin/bash | |
echo "==> Clear blacklist" | |
sudo rm /etc/ca-certificates/trust-source/blacklist/*.pem | |
echo "==> Regenerate CA list" | |
sudo update-ca-trust | |
echo "==> Blacklisting all" | |
for f in /etc/ca-certificates/extracted/cadir/*.pem; do | |
sudo cp "$f" "/etc/ca-certificates/trust-source/blacklist/$(basename "$f")" | |
done |
This file contains 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
// This file gives pseudocode for the complete operation of a Raft peer, | |
// including the fast backtracking optimization. The implementation here is | |
// currently 0-indexed, as this simplifies the implementation in many cases. | |
// This implementation also does not discuss locks at all, which will be vital | |
// in any real implementation. | |
// | |
// ============================================================================ | |
// The following data needs to be persisted | |
// ============================================================================ |
This file contains 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
#!/bin/bash | |
# | |
# Script for running `go test` a bunch of times, in parallel, storing the test | |
# output as you go, and showing a nice status output telling you how you're | |
# doing. | |
# | |
# Normally, you should be able to execute this script with | |
# | |
# ./go-test-many.sh | |
# |
When passing Go slices through interface{}
values, beware that this slows your application down. If possible, you should instead be passing around pointers to slices, and dereference them after the cast:
$ go test -c
$ ./x.test -test.bench . -test.run Benchmark -test.benchtime 3s
BenchmarkInterfaceSlice 30000000 148 ns/op
BenchmarkInterfaceSlicePtr 300000000 14.0 ns/op
$ go tool pprof -text -cum x.test slice.out | grep -vE 'testing|goexit|Benchmark'
4420ms of 4610ms total (95.88%)
Dropped 16 nodes (cum <= 23.05ms)
This file contains 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
# Maintainer: Manuel Mendez <mmendez534@gmail.com> | |
# Contributor: Jon Gjengset <jon@tsp.io> | |
pkgname=source-code-pro-fonts-powerline | |
pkgver=1.017 | |
pkgrel=3 | |
pkgdesc="A set of monospaced fonts (TTF & OTF) designed for coding environments" | |
arch=('any') | |
license=('custom:OFL') | |
url='http://sourceforge.net/projects/sourcecodepro.adobe/' |
This file contains 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
# $Id: PKGBUILD 207672 2014-03-13 00:02:32Z bisson $ | |
# Maintainer: Sean Greenslade <sean at seangreenslade dot com> | |
# Contributor: tobias [tobias [at] archlinux.org] | |
# Contributor: Gaetan Bisson <bisson@archlinux.org> | |
pkgbase=mutt | |
pkgname=${pkgbase}-slang | |
pkgver=1.5.23 | |
pkgrel=2 | |
pkgdesc='Small but very powerful text-based mail client' |
These scripts will find all git repositories on the local machine, find all commits made by some user (specified as arguments to find-commits
), and plot the number of commits, lines added, and lines removed over time. Commits that add or remove over 10000 lines will be ignored (for huge data files and such).
To run:
$ ./find-commits.sh jon@thesquareplanet.com jon@tsp.io > commits.txt
$ cat commits.txt | ./draw-commits.sh
This file contains 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
#!/bin/bash | |
if [[ $# -ne 1 ]]; then | |
echo "$0 <machine>" | |
exit 1 | |
fi | |
rem="" | |
mtype="" | |
state="" | |
state() { |