Skip to content

Instantly share code, notes, and snippets.

View iamkarlson's full-sized avatar

George Green iamkarlson

View GitHub Profile
---
name: triage
description: Interactively triage braindb hygiene problems. Assesses uncategorized notes, inbox overflow, and stale worktrees, then lets the user pick which to work on.
disable-model-invocation: true
---
# Braindb Triage
You are helping the user triage braindb hygiene problems. This is a **gradual** process — don't try to do everything at once.
chunk-vendors.6aa05006.js:68
GET https://www.abnamro.nl/session 401 (Unauthorized)
i @ chunk-vendors.6aa05006.js:68
c @ chunk-vendors.6aa05006.js:68
o @ chunk-vendors.6aa05006.js:68
f @ chunk-vendors.6aa05006.js:68
p @ chunk-vendors.6aa05006.js:68
await in p
@iamkarlson
iamkarlson / sendto.ahk
Created December 24, 2020 14:44
AutoHotkey script for "Send To" Windows menu
SetTitleMatchMode 2
global Destination := "D:\OneDrive\3dprinter\things"
;global Destination := "D:\trash\testing"
Loop %0%
{
Item := %A_Index%
Extract(Item)
FileDelete, %Item%
}
cd /usr/share/hassio/homeassistant/custom_components
wget https://github.com/hacs/integration/releases/latest/download/hacs.zip
wget https://gist.githubusercontent.com/iamkarlson/c9bc2cad7440b8f2ac72b933c29fdba4/raw/2a595f309390112034692f48a32cab26b1dcccf5/unzip.py
python3 unzip.py hacs.zip
ha core restart
@iamkarlson
iamkarlson / unzip.py
Last active May 28, 2020 20:32
unzips files with python
#!/usr/bin/env python3
import sys
from zipfile import PyZipFile
for zip_file in sys.argv[1:]:
print("unzipping %s"%zip_file)
pzf = PyZipFile(zip_file)
dir = zip_file.replace('.zip','')
pzf.extractall(dir)
@iamkarlson
iamkarlson / connect_to_android_via_tcp.sh
Created February 14, 2020 13:44
Reconnect to Android via TCP over wifi
adb tcpip 5555 && adb connect "$(adb shell "ip addr show wlan0 | grep -e wlan0$ | cut -d\" \" -f 6 | cut -d/ -f 1"):5555"
@iamkarlson
iamkarlson / Get-Shares.ps1
Created May 25, 2017 11:31
get shares from unc path
function Get-Shares(){
param (
[string] $ServerName
)
$out =@()
$netResp = (net view $ServerName)[7..100]
foreach($line in $netResp){
if($line -match "the command completed.*"){
break;
@iamkarlson
iamkarlson / Group-ByDate.ps1
Created May 21, 2017 07:11
arrange files by year/month folder
function Group-ByDate(){
[Cmdletbinding(SupportsShouldProcess=$TRUE)]
param
(
[parameter(Mandatory=$True, ValueFromPipeline=$True, Position=0)]
[String[]]$Folder
)
Write-Output "Arranging files in $folder"
$exist=Test-Path $folder;
@iamkarlson
iamkarlson / createLinksForVim.ps1
Created January 25, 2017 07:05
bootstrap my vim symlinks to repo location
push-location $HOME
$repoPath = 's:\sideprojects\dotfiles'
cmd /c mklink .vimrc $repoPath\vim\.vimrc
cmd /c mklink .gvimrc $repoPath\vim\.gvimrc
cmd /c mklink .vsvimrc $repoPath\vim\.vsvimrc
cmd /c mklink /d .vim $repoPath\vim\
push-location .config
push-location nvim
cmd /c mklink init.vim $repoPath\vim\init.vim
cmd /c mklink ginit.vim $repoPath\vim\ginit.vim
@iamkarlson
iamkarlson / Get-AssemblyInfo.ps1
Created January 11, 2017 05:39
Small powershell script which is print out assembly version from current directory
Function global:Get-AssemblyInfo()
{
param([switch]$Recurse)
if($Recurse){
get-childitem * -Recurse -include *.dll,*.exe | foreach-object { "{0}\{1}`t{2}" -f $_.Directory, $_.Name, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }
} else{
get-childitem * -include *.dll,*.exe | foreach-object { "{0}`t{1}" -f $_.Name, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }
}
}