$ uname -r
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 testutil | |
import ( | |
"context" | |
"testing" | |
"time" | |
) | |
// AssertTimeLimit asserts a time limit on a verification. | |
func AssertTimeLimit(t *testing.T, test func(t *testing.T), duration time.Duration) { |
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
alias g="git status" | |
alias gch="git checkout" | |
alias gchb="git checkout -b" | |
alias glog="git log" | |
alias glogg="git log --graph" | |
alias glogga="git log --graph --all --decorate" | |
alias ga="git add ." | |
alias gai="git add -i" | |
alias gc="git commit" | |
alias gcm="git commit -m" |
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 ( | |
"errors" | |
"fmt" | |
"fyne.io/fyne" | |
"fyne.io/fyne/app" | |
"fyne.io/fyne/container" | |
"fyne.io/fyne/dialog" | |
"fyne.io/fyne/layout" |
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" | |
"os" | |
"fyne.io/fyne" | |
"fyne.io/fyne/app" | |
"fyne.io/fyne/layout" | |
"fyne.io/fyne/widget" |
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
# MIT License | |
# | |
# Copyright (c) 2020 Doug Saylor | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
# Clean up feature branch remotes | |
gbra | grep remotes/origin/feature | sed -e 's/remotes\///g' | xargs -L 1 -I '{}' git branch -dr {} |
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 | |
find . -name "__pycache__" -exec rm -r {} + |
Show test results in a single build.gradle
.
tasks.withType(Test) {
afterTest {
desc, result ->
def lastIdx = desc.className.lastIndexOf(('.' as char) as int)
def className = desc.className.substring(lastIdx + 1)
logger.quiet "\t[TEST] [$className] $desc.name: $result.resultType"
}
}
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
# I can never seem to remember this algorithm when I need it so I figured I'd just jot it down here for posterity. | |
import random | |
# min and max are assumed to be positive integers, and min is assumed to be less than max. | |
max = 4 | |
min = 1 | |
# This part is to set the upper bound (inclusive with the + 1), but dropping it by the minimum so we know it's safe to add it back in. | |
num = abs(random.randint(0, 8192)) % (max - min + 1) |
NewerOlder