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
const router = Router(); | |
router.Method("GET", "/", function(req, vars) { | |
return {"status": "ok"}; | |
}); | |
router.Method("GET", "/?<id>[A-Za-z0-9]+)", function(req, vars) { | |
return {"status": "ok", "id": vars.id}; | |
}); | |
router.Method("POST", "/", function(req, vars) { |
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
// usage: | |
// testDB := testhelpers.NewTestDatabase(t) | |
// defer testDB.Close(t) | |
// println(testDB.ConnectionString(t)) | |
package testhelpers | |
import ( | |
"context" | |
"fmt" | |
"testing" |
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 | |
set -euo pipefail | |
###################################################### | |
## REQUIREMENTS | |
## * proper configured and running avn cli: (https://github.com/aiven/aiven-client) | |
## * installed fzf (https://github.com/junegunn/fzf) | |
## * installed jq (https://github.com/stedolan/jq) | |
## * docker | |
###################################################### | |
## CHANGE BELOW IF NECESSARY |
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
# add this to your config.fish | |
# make sure your $HOME looks like | |
# ls /home/tobias/go | |
# go1.14.6/ go1.15.2/ go1.15.4/ go1.16/ | |
function selectgo | |
set -l GOVERSIONS | |
pushd $HOME/go/ | |
for f in go* | |
set -l LINE $f |
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 [ ${#@} -lt 1 ]; then | |
echo "usage: kubesh <pod> [shell]" | |
exit 1 | |
fi | |
SHELL="sh" | |
if [ ${#@} -gt 1 ]; then | |
SHELL=${@:2} | |
fi | |
kubectl exec -ti ${1} ${SHELL} |
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 | |
PWD=$(pwd) | |
if [ -n "${PWD##*$GOPATH*}" ]; then | |
echo "$PWD not in $GOPATH" | |
exit 1 | |
fi | |
P=${PWD:${#GOPATH}} |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\System\GameConfigStore] | |
"GameDVR_Enabled"=dword:00000000 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\GameDVR] | |
"AllowGameDVR"=dword:00000000 | |
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
{ | |
f, err := os.Create("trace.out") | |
if err != nil { | |
panic(err) | |
} | |
err = trace.Start(f) | |
if err != nil { | |
panic(err) | |
} |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\exefile\shell\StartAndAttachDebugger] | |
@="Start and Attach Debugger" | |
"Icon"="vsjitdebugger.exe" | |
"Extended"="" | |
[HKEY_CLASSES_ROOT\exefile\shell\StartAndAttachDebugger\command] | |
@="powershell Start-Process \"vsjitdebugger.exe\" -Verb runAs -ArgumentList \"%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
<Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'"> | |
<CreateItem Include="$(SolutionDir)\packages\ILMerge.*\tools\ILMerge.exe"> | |
<Output TaskParameter="Include" ItemName="ILMergeExe" /> | |
</CreateItem> | |
<Error Text="@(ILMergeExe) does not exists" Condition="!Exists('@(ILMergeExe)')" /> | |
<CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true'"> | |
<Output TaskParameter="Include" ItemName="ILMergeAssemblies" /> | |
</CreateItem> | |
<Delete Files="$(OutputPath)\ILMerge.log" Condition="Exists('$(OutputPath)\ILMerge.log')" /> | |
<Exec Command=""@(ILMergeExe)" /ndebug /log:$(OutputPath)\ILMerge.log /out:@(MainAssembly) "@(IntermediateAssembly)" @(ILMergeAssemblies->'"%(FullPath)"', ' ')" /> |
NewerOlder