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
func BenchmarkCheckEven(b *testing.B) { | |
nums := make([]uint64, 10000) | |
for i := 0; i < len(nums); i++ { | |
bytes := make([]byte, 8) | |
_, err := rand.Read(bytes) | |
require.NoError(b, err) | |
val := binary.BigEndian.Uint64(bytes) | |
nums[i] = val | |
} |
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
# need to generate a key for github at this point and add it to github. or do that before. | |
# ssh-keygen -o -a 100 -t ed25519 | |
sudo apt update | |
sudo apt install git build-essentials zsh curl | |
# Install fd | |
mkdir -p bin | |
cd Download | |
wget https://github.com/sharkdp/fd/releases/download/v7.4.0/fd_7.4.0_amd64.deb |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"net" | |
"time" | |
) | |
func main() { |
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 | |
# Match 0.x-1 | |
REGEX='^0.+([0-9]+)+$|1' | |
SCRIPT_NAME=`basename "$0"` | |
if ! [[ $1 =~ $REGEX ]] ; then | |
echo "Usage: ${0##*/} <brightness_value_0.x_to_1>" >&2; exit 1 | |
fi |
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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<!-- | |
Hinting makes terminal fonts look pretty shitty but makes browser fonts |
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
# List Custom gopaths | |
gopaths=('/home/piers/projects/ethdenver' '/home/piers/projects/test_gopath') | |
# Always available gopath | |
fallback_gopath=$HOME/go | |
# Used to detect when the gopath changes | |
previous_gopath='' | |
#setgopath sets the gopath based on the current working dierectory. If the | |
#current working dierectory is a gopath or a subdirectory of a gopath then |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
) | |
const ( | |
ChunkSize = (1 << 16) | |
NumValues = 100 |
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
pdftk $1 output - uncompress | perl -p -e 's/BT$/BT\n0.3 0.3 0.3 rg/' | pdftk - output - compress > $1 |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"regexp" | |
"time" | |
"unicode" | |
"unicode/utf8" | |
) |
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
Wed Aug 2 20:03:40 UTC 2017 |
NewerOlder