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
# You should insert this script into your PowerShell Profile script so it exists in every session | |
# Fun fact: This script was mostly generated by ChatGPT by giving it the bash version of the output | |
# from `github-copilot-cli alias -- "$0"` with a few fixes from me | |
function Invoke-CopilotWhatTheShell { | |
$TMPFILE = New-TemporaryFile; | |
try { | |
github-copilot-cli what-the-shell $args --shellout $TMPFILE | |
if ($LASTEXITCODE -eq 0) { |
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/env sh | |
sudo update-alternatives --install \ | |
/usr/bin/llvm-config llvm-config /usr/bin/llvm-config-3.6 200 \ | |
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-3.6 \ | |
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.6 \ | |
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-3.6 \ | |
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-3.6 \ | |
--slave /usr/bin/llvm-diff llvm-diff /usr/bin/llvm-diff-3.6 \ | |
--slave /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-3.6 \ |
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
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d |
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" | |
"github.com/uber-common/cadence-samples/cmd/samples/common" | |
"go.uber.org/cadence/client" | |
"go.uber.org/cadence/worker" | |
"go.uber.org/cadence/workflow" | |
"go.uber.org/zap" | |
"time" |
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 com.uber.cadence.samples.hello; | |
import com.uber.cadence.client.WorkflowClient; | |
import com.uber.cadence.worker.Worker; | |
import com.uber.cadence.workflow.QueryMethod; | |
import com.uber.cadence.workflow.Workflow; | |
import com.uber.cadence.workflow.WorkflowMethod; | |
import static com.uber.cadence.samples.common.SampleConstants.DOMAIN; |
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
function boyerMooreHorspool( haystack, needle, start ) { | |
var nlen = needle.length | |
var hlen = haystack.length | |
if( nlen <= 0 || hlen <= 0 ) | |
return -1 | |
var jump, offset = start || 0 | |
var scan = 0 |
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 | |
bucket=$1 | |
set -e | |
echo "Removing all versions from $bucket" | |
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
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
for p in $(find . -name "*.shp"); do | |
f=${p##*/} | |
layer=${f%.*} | |
echo "file:$f -> $(ogrinfo $p $layer -so | grep PROJCS)" | |
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
# Heavily depends on: | |
# libqrencode (fukuchi.org/works/qrencode/) | |
# paperkey (jabberwocky.com/software/paperkey/) | |
# zbar (zbar.sourceforge.net) | |
# Producing the QR codes: | |
# Split over 4 codes to ensure the data per image is not too large. | |
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp | |
split temp -n 4 IMG | |
for f in IMG*; do cat $f | qrencode -o $f.png; 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
### Keybase proof | |
I hereby claim: | |
* I am raymondkroon on github. | |
* I am raymondkroon (https://keybase.io/raymondkroon) on keybase. | |
* I have a public key ASAD-Eucvv8ZLd-9VhlEnXTpw0wDuDENifaGcK6dLw5RpQo | |
To claim this, I am signing this object: |
NewerOlder