Skip to content

Instantly share code, notes, and snippets.

View gizmomogwai's full-sized avatar

Christian Köstlin gizmomogwai

View GitHub Profile
@gizmomogwai
gizmomogwai / .gitignore
Created July 1, 2023 18:39 — forked from CyberShadow/.gitignore
nntp-md-adder
/nntp-md-adder
@gizmomogwai
gizmomogwai / kitchen.plantuml
Last active April 14, 2018 13:57
The Kitchen, dish, dishwasher algorithm
@startuml
start
note right: Agent enters the kitchen to bring back a dish (e.g. glass, cup, mug, plate, ...)
if (Dishwasher running?) then (yes)
:Put dish into sink;
stop
else (no)
if (Dishwasher full?) then (yes)
if (Dishes in dishwasher clean?) then (yes)
:Put clean dishes back;
intellij-community
.DS_Store
*.png
@gizmomogwai
gizmomogwai / copy-lp-user.fish
Created December 2, 2016 09:43
fish function to copy lastpass username to the clipboard
function copy-lp-name -d "copy lp name"
if lpass ls | fzf > /tmp/fzf.result
set lp_account (cat /tmp/fzf.result | cut -d ' ' -f 1)
set lp_username (lpass show $lp_account | grep 'Username:' | cut -d ' ' -f 2)
echo -n $lp_username | copy
end
end
@gizmomogwai
gizmomogwai / copy-lp-pass.fish
Last active December 2, 2016 09:42
fish function to copy a lastpass password to the clipboard
function copy-lp-pass -d "copy lp pass"
if lpass ls | fzf > /tmp/fzf.result
set lp_account (cat /tmp/fzf.result | cut -d ' ' -f 1)
set lp_pass (lpass show $lp_account | grep 'Password:' | cut -d ' ' -f 2)
echo -n $lp_pass | copy
end
end
@gizmomogwai
gizmomogwai / copy.fish
Created December 2, 2016 09:39
fish function for copy to clipboard
function copy -d 'copy to clipboard'
switch (uname)
case Linux
xsel --clipboard --input
case Darwin
pbcopy
case '*'
echo "copy not supported for (uname)"
end
end
@gizmomogwai
gizmomogwai / up.fish
Created May 31, 2016 21:44
fish function to combine lpass with fzf and pbcopy
function up -d "lastpass user and password"
if lpass ls | fzf > /tmp/fzf.result
cat /tmp/fzf.result
set account_name (cat /tmp/fzf.result | cut -f 1 -d ' ')
lpass show --username $account_name | pbcopy
read -p 'echo username stored in clipboard ... press return to continue'
lpass show --password $account_name | pbcopy
read -p 'echo password stored in clipboard ... press return to continue'
end
end
@gizmomogwai
gizmomogwai / cloud-config.yaml
Created August 17, 2015 21:48
simple cloud config file
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAs5zpVBQD4paP5RVkb6LGsjGjQXANP0S7SUxXkTY4+3Muov651wzcX/VmDHBQFLSmT92PdqSXL2+8HiAvlPxaHohZIsIu7JEOO5yvAeb/y/rw5Gp1ggVieVojLLbhhnZ5ECTR4Wj7/TvQI7IaL0WH8KHzo8Q+nBz1ZzLkIDTjGAfcgwxZ32ieGAea5rDjFouxmIZTisMIdroAZT0M/QvM1GgbXmHaairYLsJJDE1CUI5GjHGLFbCE10qRlXqHMyw6GKkoXiV4LzvnIcQ1J0l7GIWq6vnvy2NWkMBckA/DLnL123Z95676KwIHlzDw11LPzXv1ncwf5lOOWRuLa+OWcw== gizmo@armadillo
@gizmomogwai
gizmomogwai / rt.bash
Created August 17, 2015 19:54
execute one rake task for bash
#!/bin/bash
function rt() {
local task
task=$(rake -T | fzf | cut -d ' ' -f 2)
rake $task
}
@gizmomogwai
gizmomogwai / rt.fish
Created August 17, 2015 19:40
select one raketask with fzf in the fish shell
function rt -d "select one rake task"
if rake -T | fzf > $TMPDIR/fzf.result
set fzf_result (cat $TMPDIR/fzf.result | cut -d ' ' -f 2)
set h "rake $fzf_result"
commandline $h
end
end