Skip to content

Instantly share code, notes, and snippets.

@shedali
shedali / clone-all-repos.sh
Last active July 3, 2023 08:36
clone all org repos
export GITHUB_TOKEN=$(op plugin run gh auth token)
for org in $(gh org list); do
o=${org}
/usr/local/bin/op plugin run -- gh repo list $o --json name -q '.[] | .name' | while read -r repo; do
dir=$o/$repo
echo $dir
if [ -d "$dir" ]; then
(cd $dir && git stash --all && gh repo sync && git stash pop)
else
gh repo clone $dir $dir
@shedali
shedali / transclude.js
Last active July 11, 2021 01:20
ia markdown content blocks transclude
const fs = require("fs");
const path = require("path");
const isDirectory = require("is-directory");
const isFile = require("is-file");
const fm = require("front-matter");
const arg = path.join(__dirname, process.argv[2]);
const regex = /^\/.*\.*/;
const readline = require("readline");
const iscontentblock = (str) => regex.test(str);
@shedali
shedali / machine.js
Created November 4, 2020 16:19
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'INITIAL',
initial: 'INITIAL',
context:{
sufficientNotional: false,
sufficientMarginal: false,
instrumentCount: 0,
editingInstrument: false,
sufficientFunds: false
@shedali
shedali / machine.js
Last active November 2, 2020 18:48
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'empty',
initial: 'empty',
context:{
sufficientNotional: false,
sufficientMarginal: false,
instrumentCount: 0,
editingInstrument: false
},
@shedali
shedali / machine.js
Last active October 28, 2020 16:43
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
BEGIN MESSAGE.
34rmwjnYdFhUNh6 S7bGA8KbY5lNtE3 qA8n7ADhH70hIfP 2vek11iXborn7xt
zLhcXQP1JAUSuYP ofAx0OpR9XLTCKq 6Xr2MZHgg4SaVzL wexF29qvvjWjLjs
8EXPEsVIxDbpaBT NfA1acJEhoMGypi sxXkaiPCdT6YLyD 5Ngmz1oRMqEDJhG
Nti0BD7Ryx1ZEHW XgZMB2Tk00yZzde TsatW2IP.
END MESSAGE.
brew "adns"
brew "alexanderwillner/tap/things.sh"
brew "ant"
brew "antigen"
brew "aria2"
brew "asciinema"
brew "asdf"
brew "autoconf"
brew "autojump"
brew "automake"
@shedali
shedali / Widget.html
Last active August 24, 2020 15:56
svelte compile for php include
<script>
export let answer=""
</script>
<style>
.encapsulated-style-here {
color: red;
}
</style>
tap "alexanderwillner/tap"
tap "bbc/audiowaveform"
tap "buo/cask-upgrade"
tap "d12frosted/emacs-plus"
tap "ethereum/ethereum"
tap "facebook/fb"
tap "garden-io/garden"
tap "github/gh"
tap "heroku/brew"
tap "homebrew/bundle"
tap "alexanderwillner/tap"
tap "bbc/audiowaveform"
tap "buo/cask-upgrade"
tap "d12frosted/emacs-plus"
tap "ethereum/ethereum"
tap "facebook/fb"
tap "garden-io/garden"
tap "github/gh"
tap "heroku/brew"
tap "homebrew/bundle"