├── .gitignore ├── README.md ├── package.json ├── scripts ├── browse-scriptkit.js ├── codepen.js ├── dotfiles.js ├── edit-main.js ├── go-brew.js ├── hsl.js ├── kody │ ├── config.json │ └── osx.sh ├── links │ ├── .zshrc.link │ ├── git │ │ ├── .gitconfig.link │ │ └── .gitignore.link │ ├── jh3y-iterm.json │ ├── spectacle │ │ └── Shortcuts.json │ ├── sublime │ │ ├── Default (OSX).sublime-keymap │ │ ├── Emmet.sublime-settings │ │ ├── Package Control.sublime-settings │ │ └── Preferences.sublime-settings │ └── vscode │ │ ├── keybindings.json │ │ └── settings.json ├── osx.js ├── setup.js └── svgo.js └── templates ├── codepen ├── dev.pug ├── index.pug ├── script.js └── style.styl ├── default.js ├── test.js ├── text.js ├── tutorial.js ├── tutorial.md └── with-metadata.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | .history 106 | 107 | # Things I don't need? 108 | cache 109 | app 110 | lib 111 | bin 112 | db 113 | tmp 114 | kit 115 | .kit -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My Script Kit ʕ •ᴥ•ʔ 2 | 3 | My personal script kit using [@johnlindquist](https://twitter.com/johnlindquist)'s [ScriptKit](https://scriptkit.app) :+1: 4 | 5 | Check out [ScriptKit](https://scriptkit.app) to start automating all the things! 6 | 7 | ## Current Scripts 8 | - [codepen](scripts/codepen.js): Create files from templates and kick off my personal CodePen development process. 9 | 10 | --- 11 | Maintained by [@jh3yy](https://twitter.com/jh3yy) ʕ·ᴥ· ʔ -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "dependencies": { 4 | "color": "^3.1.3" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /scripts/browse-scriptkit.js: -------------------------------------------------------------------------------- 1 | //Menu: Browse scriptkit.app 2 | //Description: Launch scriptkit.app in your browser 3 | 4 | //Note: Feels free to delete this script! 5 | 6 | exec(`open https://scriptkit.app`) 7 | -------------------------------------------------------------------------------- /scripts/codepen.js: -------------------------------------------------------------------------------- 1 | // Menu: CodePen 2 | // Description: Develop a CodePen demo. 3 | // Author: Jhey Tompkins 4 | // Twitter: @jh3yy 5 | 6 | const penName = await arg('New CodePen Name:') 7 | 8 | const PEN_ROOT = await env('CODEPEN_ROOT_PATH', { 9 | message: 'Where do CodePen live?', 10 | }) 11 | const TEMPLATES = ['index.pug', 'dev.pug', 'script.js', 'style.styl'] 12 | const DESTINATION = `${PEN_ROOT}/src/${penName}` 13 | // If the directory doesn't exist, create the files. 14 | if (!test('-e', DESTINATION)) { 15 | mkdir('-p', DESTINATION) 16 | // Create files from my templates. 17 | for (const temp of TEMPLATES) { 18 | let content = await compileTemplate(`codepen/${temp}`, { name: penName }) 19 | await writeFile(`${DESTINATION}/${temp}`, content) 20 | } 21 | } 22 | // The files are there. Open them up! 23 | exec(`code ${DESTINATION}`) 24 | await edit(`${DESTINATION}/${TEMPLATES[1]}`) 25 | 26 | // Kick off development. Make Awesome Stuff! 27 | iterm(`cd ${PEN_ROOT}; make develop PEN=${penName}`) 28 | -------------------------------------------------------------------------------- /scripts/dotfiles.js: -------------------------------------------------------------------------------- 1 | // const $HOME = exec('echo $HOME', { silent: true }).trim() 2 | const $HOME = home() 3 | 4 | const PROPS = { 5 | FILE_REGEXP: /\.link$/, 6 | FILE_SUFFIX: '.link', 7 | } 8 | 9 | const backupDotfile = dest => { 10 | if (test('-f', dest) && !test('-L', dest)) { 11 | const bak = `${dest}.bak` 12 | console.info(`Backing up ${dest} to ${bak}`) 13 | cp('-rf', dest, bak) 14 | rm('-rf', dest) 15 | } 16 | } 17 | 18 | const restoreDotfile = dest => { 19 | const bak = `${dest}.bak` 20 | if (test('-f', bak)) { 21 | console.info(`Putting original back ${dest}`) 22 | cp('-rf', bak, dest) 23 | console.info(`Removing symlink backup from ${dest}.bak`) 24 | rm('-rf', bak) 25 | } 26 | } 27 | 28 | const symlinkDotfile = (source, dest, backup) => { 29 | console.info(`Symlinking ${source} to ${dest}`) 30 | if (backup) backupDotfile(dest) 31 | const result = ln('-sf', source, dest) 32 | if (result.code !== 0) { 33 | if (backup) restoreDotfile(dest) 34 | throw new Error(result.stderr) 35 | } 36 | } 37 | 38 | const ROOT = `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links` 39 | const files = await ls('-AR', ROOT).filter(f => f.match(PROPS.FILE_REGEXP)) 40 | 41 | if (files.length) { 42 | for (const file of files) { 43 | const source = `${ROOT}/${file}` 44 | let name = basename(file).replace(PROPS.FILE_SUFFIX, '') 45 | const dest = `${$HOME}/${name}` 46 | try { 47 | symlinkDotfile(source, dest, true) 48 | } catch (err) { 49 | throw new Error(err) 50 | } 51 | } 52 | } 53 | 54 | // Symlink Sublime Text settings 55 | const sublimeBase = `${$HOME}/Library/Application Support/Sublime Text/Packages/User` 56 | ln('-sf', `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links/sublime/Default (OSX).sublime-keymap`, `${sublimeBase}/Default (OSX).sublime-keymap`) 57 | ln('-sf', `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links/sublime/Emmet.sublime-settings`, `${sublimeBase}/Emmet.sublime-settings`) 58 | ln('-sf', `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links/sublime/Package Control.sublime-settings`, `${sublimeBase}/Package Control.sublime-settings`) 59 | ln('-sf', `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links/sublime/Preferences.sublime-settings`, `${sublimeBase}/Preferences.sublime-settings`) 60 | // Symlink Spectacle settings 61 | const specsBase = `${$HOME}/Library/Application Support/Spectacle` 62 | ln('-sf', `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links/spectacle/Shortcuts.json`, `${specsBase}/Shortcuts.json`) 63 | // Symlink VSCode settings 64 | // const vsBase = `${$HOME}/Library/Application Support/Code/User` 65 | // ln('-sf', `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links/vscode/keybindings.json`, `${vsBase}/keybindings.json`) 66 | // ln('-sf', `${$HOME}/.kenv/kenvs/my-script-kit/scripts/links/vscode/settings.json`, `${vsBase}/settings.json`) 67 | -------------------------------------------------------------------------------- /scripts/edit-main.js: -------------------------------------------------------------------------------- 1 | //Menu: Edit Main Script 2 | //Description: Edit the script/shortcut that opens this menu 3 | 4 | //Note: Feel free to delete this script! 5 | //Type cmd + shift + ; , then type "remove" 6 | 7 | edit(kenvPath("app/left-click.js"), kenvPath()) 8 | -------------------------------------------------------------------------------- /scripts/go-brew.js: -------------------------------------------------------------------------------- 1 | // Menu: Go Brew 2 | // Description: Install my favorite apps. 3 | // Author: Jhey Tompkins 4 | // Twitter: @jh3yy 5 | 6 | // const INSTALL_STRING = `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` 7 | 8 | const BREW_INSTALLED = await which('brew') 9 | if (!BREW_INSTALLED) exec('echo "No Brew"') 10 | // const $HOME = exec('echo $HOME', { silent: true }) 11 | const $HOME = home() 12 | const APP_CONFIG = await readFile(`${$HOME}/.kenv/kenvs/my-script-kit/scripts/kody/config.json`, 'utf-8') 13 | const APP_LIST = JSON.parse(APP_CONFIG).apps.join(' ') 14 | 15 | const COMMAND = `brew install ${APP_LIST}` 16 | await exec(COMMAND) 17 | 18 | await exec('say "Brew Formulae Installed!"') 19 | -------------------------------------------------------------------------------- /scripts/hsl.js: -------------------------------------------------------------------------------- 1 | // Menu: HSL 2 | // Description: Convert any color to HSL. 3 | // Author: Jhey Tompkins 4 | // Twitter: @jh3yy 5 | 6 | let { setSelectedText } = await kit("text") 7 | const Color = await npm("color") 8 | 9 | const createHTML = color => 10 | `
${ 11 | color || "" 12 | }
` 13 | 14 | const createChoices = (input, value) => { 15 | console.info(input, value) 16 | return [ 17 | { 18 | name: value, 19 | value: value, 20 | //I renamed "info" to "html" 21 | html: createHTML(input), 22 | }, 23 | ] 24 | } 25 | 26 | const hslArray = await arg("Color String:", input => { 27 | let hsl = input 28 | try { 29 | hsl = Color(input).hsl() 30 | } catch { 31 | //catch error and return whatever 32 | return createChoices(input, "Invalid color") 33 | } 34 | //The HSL lib was returning an object with a "color" prop as an Array 35 | return createChoices(input, hsl.toString()) 36 | }) 37 | 38 | setSelectedText(hslArray) -------------------------------------------------------------------------------- /scripts/kody/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "apps": [ 3 | "android-file-transfer", 4 | "audacity", 5 | "bartender", 6 | "beeper", 7 | "bitwarden", 8 | "blackhole-2ch", 9 | "brave-browser", 10 | "caffeine", 11 | "calibre", 12 | "cheatsheet", 13 | "cleanshot", 14 | "descript", 15 | "discord", 16 | "docker", 17 | "dropzone", 18 | "elgato-camera-hub", 19 | "elgato-control-center", 20 | "elgato-stream-deck", 21 | "fig", 22 | "figma", 23 | "firefox", 24 | "firefox-nightly", 25 | "homebrew/cask-fonts/font-jetbrains-mono", 26 | "google-chrome", 27 | "google-chrome-canary", 28 | "google-drive", 29 | "handbrake", 30 | "iterm2", 31 | "logitech-options", 32 | "logitech-presentation", 33 | "microsoft-edge", 34 | "notion", 35 | "remarkable", 36 | "rive", 37 | "safari-technology-preview", 38 | "screenflow", 39 | "sip", 40 | "slack", 41 | "spectacle", 42 | "spline", 43 | "spotify", 44 | "steam", 45 | "streamlabs-obs", 46 | "sublime-text", 47 | "warp", 48 | "homebrew/cask-drivers/yubico-authenticator", 49 | "zoom", 50 | "antigen", 51 | "ffmpeg", 52 | "mkcert", 53 | "git", 54 | "node", 55 | "zsh" 56 | ], 57 | "extensions": [ 58 | "aaron-bond.better-comments", 59 | "bierner.emojisense", 60 | "bradlc.vscode-tailwindcss", 61 | "CoenraadS.bracket-pair-colorizer", 62 | "dbaeumer.vscode-eslint", 63 | "dzannotti.vscode-babel-coloring", 64 | "eamodio.gitlens", 65 | "EditorConfig.EditorConfig", 66 | "esbenp.prettier-vscode", 67 | "formulahendry.auto-close-tag", 68 | "formulahendry.auto-rename-tag", 69 | "GitHub.github-vscode-theme", 70 | "idleberg.emoji-code", 71 | "ms-vscode.atom-keybindings", 72 | "ms-vscode.node-debug2", 73 | "ms-vsliveshare.vsliveshare", 74 | "ms-vsliveshare.vsliveshare-audio", 75 | "ms-vsliveshare.vsliveshare-pack", 76 | "naumovs.color-highlight", 77 | "octref.vetur", 78 | "oderwat.indent-rainbow", 79 | "pnp.polacode", 80 | "sdras.night-owl", 81 | "silvenon.mdx", 82 | "SirTori.indenticator", 83 | "sysoev.language-stylus", 84 | "usernamehw.errorlens", 85 | "vscode-icons-team.vscode-icons", 86 | "wix.vscode-import-cost", 87 | "yzhang.markdown-all-in-one", 88 | "Zignd.html-css-class-completion" 89 | ], 90 | "npm": ["netlify-cli", "yarn", "vercel"] 91 | } 92 | -------------------------------------------------------------------------------- /scripts/kody/osx.sh: -------------------------------------------------------------------------------- 1 | echo "Setting OSX Defaults" 2 | 3 | 4 | # Finder 5 | # by default show all hidden files in Finder 6 | defaults write com.apple.finder AppleShowAllFiles -bool true 7 | defaults write com.apple.finder AppleShowAllExtensions -bool true 8 | defaults write com.apple.finder ShowStatusBar -bool true 9 | defaults write com.apple.finder _FXShowPosixPathInTitle -bool true 10 | 11 | # Password prompting 12 | defaults write com.apple.screensaver askForPassword -int 1 13 | defaults write com.apple.screensaver askForPasswordDelay -int 0 14 | 15 | # Disable sudden motion sensor as not useful for SSD 16 | sudo pmset -a sms 0 17 | 18 | # set default appearance for dock 19 | defaults write com.apple.dock autohide -bool true 20 | defaults write com.apple.dock magnification -bool true 21 | defaults write com.apple.dock orientation -string right 22 | defaults write com.apple.dock tilesize -int 16 23 | defaults write com.apple.dock autohide-delay -float 0 24 | defaults write com.apple.dock autohide-time-modifier -float 0 25 | 26 | # Hide stuff from the fruit 27 | defaults write com.apple.Safari UniversalSearchEnabled -bool false 28 | defaults write com.apple.Safari SuppressSearchSuggestions -bool true 29 | 30 | #Disable Dashboard 31 | defaults write com.apple.dashboard mcx-disabled -bool true 32 | 33 | # Set a really fast key repeat. 34 | defaults write NSGlobalDomain KeyRepeat -int 0 35 | 36 | # Wipe dock on new setup 37 | defaults write com.apple.dock persistent-apps -array 38 | 39 | #Set up hot corners 40 | defaults write com.apple.dock "wvous-bl-corner" -int 4 41 | defaults write com.apple.dock "wvous-bl-modifier" -int 0 42 | defaults write com.apple.dock "wvous-br-corner" -int 10 43 | defaults write com.apple.dock "wvous-br-modifier" -int 0 44 | defaults write com.apple.dock "wvous-tl-corner" -int 3 45 | defaults write com.apple.dock "wvous-tl-modifier" -int 0 46 | defaults write com.apple.dock "wvous-tr-corner" -int 4 47 | defaults write com.apple.dock "wvous-tr-modifier" -int 0 48 | 49 | # Terminal 50 | defaults write com.apple.terminal StringEncodings -array 4 51 | defaults write com.apple.Terminal "Default Window Settings" -string "Pro" 52 | defaults write com.apple.Terminal "Startup Window Settings" -string "Pro" 53 | 54 | # Show drives and devices 55 | defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true 56 | defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true 57 | defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true 58 | 59 | # Disable back swipe in Chrome 60 | defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false 61 | defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false 62 | 63 | 64 | # Set up Safari for development. 65 | defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 66 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 67 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 68 | defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true 69 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 70 | defaults write com.apple.Safari ShowSidebarInTopSites -bool false 71 | defaults write com.apple.Safari ShowFavoritesBar -bool false 72 | 73 | # Restart Finder and Dock so things happen! 74 | 75 | killall Finder Dock Terminal SystemUIServer 76 | -------------------------------------------------------------------------------- /scripts/links/.zshrc.link: -------------------------------------------------------------------------------- 1 | # Fig pre block. Keep at the top of this file. 2 | [[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && . "$HOME/.fig/shell/zshrc.pre.zsh" 3 | # If you come from bash you might have to change your $PATH. 4 | # export PATH=$HOME/bin:/usr/local/bin:$PATH:$HOME/.kenv/bin 5 | 6 | # Path to your oh-my-zsh installation. 7 | # export ZSH="/Users/jhey/.oh-my-zsh" 8 | 9 | # Set name of the theme to load. Optionally, if you set this to "random" 10 | # it'll load a random theme each time that oh-my-zsh is loaded. 11 | # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes 12 | # ZSH_THEME="agnoster" 13 | 14 | # Set list of themes to load 15 | # Setting this variable when ZSH_THEME=random 16 | # cause zsh load theme from this variable instead of 17 | # looking in ~/.oh-my-zsh/themes/ 18 | # An empty array have no effect 19 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 20 | 21 | # Uncomment the following line to use case-sensitive completion. 22 | # CASE_SENSITIVE="true" 23 | 24 | # Uncomment the following line to use hyphen-insensitive completion. Case 25 | # sensitive completion must be off. _ and - will be interchangeable. 26 | # HYPHEN_INSENSITIVE="true" 27 | 28 | # Uncomment the following line to disable bi-weekly auto-update checks. 29 | # DISABLE_AUTO_UPDATE="true" 30 | 31 | # Uncomment the following line to change how often to auto-update (in days). 32 | # export UPDATE_ZSH_DAYS=13 33 | 34 | # Uncomment the following line to disable colors in ls. 35 | # DISABLE_LS_COLORS="true" 36 | 37 | # Uncomment the following line to disable auto-setting terminal title. 38 | # DISABLE_AUTO_TITLE="true" 39 | 40 | # Uncomment the following line to enable command auto-correction. 41 | # ENABLE_CORRECTION="true" 42 | 43 | # Uncomment the following line to display red dots whilst waiting for completion. 44 | # COMPLETION_WAITING_DOTS="true" 45 | 46 | # Uncomment the following line if you want to disable marking untracked files 47 | # under VCS as dirty. This makes repository status check for large repositories 48 | # much, much faster. 49 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 50 | 51 | # Uncomment the following line if you want to change the command execution time 52 | # stamp shown in the history command output. 53 | # You can set one of the optional three formats: 54 | # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 55 | # or set a custom format using the strftime function format specifications, 56 | # see 'man strftime' for details. 57 | # HIST_STAMPS="mm/dd/yyyy" 58 | 59 | # Would you like to use another custom folder than $ZSH/custom? 60 | # ZSH_CUSTOM=/path/to/new-custom-folder 61 | 62 | # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 63 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 64 | # Example format: plugins=(rails git textmate ruby lighthouse) 65 | # Add wisely, as too many plugins slow down shell startup. 66 | #plugins=( 67 | # git 68 | #) 69 | 70 | # source $ZSH/oh-my-zsh.sh 71 | 72 | # User configuration 73 | 74 | # export MANPATH="/usr/local/man:$MANPATH" 75 | 76 | # You may need to manually set your language environment 77 | # export LANG=en_US.UTF-8 78 | 79 | # Preferred editor for local and remote sessions 80 | # if [[ -n $SSH_CONNECTION ]]; then 81 | # export EDITOR='vim' 82 | # else 83 | # export EDITOR='mvim' 84 | # fi 85 | 86 | # Compilation flags 87 | # export ARCHFLAGS="-arch x86_64" 88 | 89 | # ssh 90 | # export SSH_KEY_PATH="~/.ssh/rsa_id" 91 | 92 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 93 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 94 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 95 | # For a full list of active aliases, run `alias`. 96 | # 97 | # Example aliases 98 | # alias zshconfig="mate ~/.zshrc" 99 | # alias ohmyzsh="mate ~/.oh-my-zsh" 100 | # 101 | # Git aliases 102 | # 103 | alias gs="git status" 104 | alias gca="git commit -a -m" 105 | alias gau="git remote add upstream" 106 | alias gaa="git add --all" 107 | alias gpl="git pull" 108 | alias gpu="git push" 109 | alias gps="git push && say You are awesome!" 110 | alias yolos="git push --force && say That was sneaky!" 111 | alias yolo="git push --force" 112 | alias gcl="git clone" 113 | alias glg="git log" 114 | alias gst="git shortlog -sn" 115 | alias gch="git checkout" 116 | alias gba="git branch -av" 117 | alias gsl="git stash list" 118 | alias gsc="git stash clear" 119 | function gdb() { 120 | git branch -d $1 121 | git push origin :$1 122 | } 123 | function gas() { 124 | git stash apply stash@\{$1\} 125 | } 126 | function grb() { 127 | git rebase -i HEAD~$1 128 | } 129 | 130 | # 131 | # Wipe traces from Application Support 132 | # 133 | function wipe_me() { 134 | sudo rm -rf /Library/Application\ Support/Skype /Library/Application\ Support/Spotify 135 | echo 'Presence deleted' 136 | } 137 | 138 | # 139 | # Grab current IP 140 | # 141 | alias my_ip="echo Your deetz: $(ipconfig getifaddr en0)" 142 | 143 | # 144 | # See what npm modules are installed globally 145 | # 146 | alias npm_clog="npm list --global --depth 0" 147 | 148 | # 149 | # Serve current directory 150 | # 151 | # alias serve="python -m SimpleHTTPServer 8000" 152 | serve() { python -m SimpleHTTPServer "${1:-8000}" } 153 | 154 | # 155 | # Network utils 156 | # 157 | alias ethernet_on="sudo ifconfig en0 up" 158 | alias ethernet_off="sudo ifconfig en0 down" 159 | alias wifi_on="sudo ifconfig en1 up" 160 | alias wifi_off="sudo ifconfig en1 down" 161 | 162 | # vpn-fix whitelisting alias: https://github.com/darahayes/vpn-fix 163 | alias vpnfix='sudo ~/vpn-fix/vpn-fix ~/vpn-fix/whitelist.txt' 164 | 165 | DEFAULT_USER=$USER 166 | prompt_context(){} 167 | 168 | source /opt/homebrew/share/antigen/antigen.zsh 169 | 170 | # Load the oh-my-zsh library 171 | antigen use oh-my-zsh 172 | 173 | antigen bundle zsh-users/zsh-syntax-highlighting 174 | antigen bundle zsh-users/zsh-autosuggestions 175 | antigen bundle zsh-users/zsh-completions 176 | antigen bundle lukechilds/zsh-nvm 177 | 178 | 179 | # Load the theme 180 | antigen theme agnoster 181 | 182 | # Tell antigen that you're done 183 | antigen apply 184 | 185 | echo Hey jh3y! 👋 186 | echo Time to write some code 👍 187 | 188 | # bun completions 189 | [ -s "/Users/jheyy/.bun/_bun" ] && source "/Users/jheyy/.bun/_bun" 190 | 191 | # Bun 192 | export BUN_INSTALL="/Users/jheyy/.bun" 193 | export PATH=$HOME/bin:/usr/local/bin:$PATH:$HOME/.kenv/bin:"$BUN_INSTALL/bin:$PATH" 194 | 195 | # Fig post block. Keep at the bottom of this file. 196 | [[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && . "$HOME/.fig/shell/zshrc.post.zsh" 197 | -------------------------------------------------------------------------------- /scripts/links/git/.gitconfig.link: -------------------------------------------------------------------------------- 1 | # Simple gitconfig 2 | # 3 | [init] 4 | defaultBranch = main 5 | [user] 6 | name = jh3y 7 | email = jh3y@users.noreply.github.com 8 | [credential] 9 | helper = osxkeychain 10 | [core] 11 | excludesfile = ~/.gitignore 12 | [push] 13 | default = simple 14 | [http] 15 | postBuffer = 524288000 16 | -------------------------------------------------------------------------------- /scripts/links/git/.gitignore.link: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .AppleDouble 3 | .LSOverride 4 | *~ 5 | *.swp 6 | # Icon must end with two \r 7 | Icon 8 | #Node 9 | node_modules 10 | #Thumbnails 11 | ._* 12 | #External disk 13 | .Spotlight-V100 14 | .Trashes 15 | #Remote App Share 16 | .AppleDB 17 | .AppleDesktop 18 | Network Trash Folder 19 | Temporary Items 20 | .apdisk 21 | -------------------------------------------------------------------------------- /scripts/links/jh3y-iterm.json: -------------------------------------------------------------------------------- 1 | { 2 | "Link Color" : { 3 | "Red Component" : 0.023000000044703484, 4 | "Color Space" : "Calibrated", 5 | "Blue Component" : 0.67799997329711914, 6 | "Alpha Component" : 1, 7 | "Green Component" : 0.27000001072883606 8 | }, 9 | "Tags" : [ 10 | 11 | ], 12 | "Ansi 12 Color" : { 13 | "Red Component" : 0.61468899250030518, 14 | "Color Space" : "Calibrated", 15 | "Blue Component" : 0.99877572059631348, 16 | "Alpha Component" : 1, 17 | "Green Component" : 0.39599207043647766 18 | }, 19 | "Ansi 7 Color" : { 20 | "Red Component" : 0.76960963010787964, 21 | "Color Space" : "Calibrated", 22 | "Blue Component" : 0.70993047952651978, 23 | "Alpha Component" : 1, 24 | "Green Component" : 0.77144092321395874 25 | }, 26 | "Ansi 8 Color" : { 27 | "Red Component" : 0.3829454779624939, 28 | "Color Space" : "Calibrated", 29 | "Blue Component" : 0.29652142524719238, 30 | "Alpha Component" : 1, 31 | "Green Component" : 0.36959609389305115 32 | }, 33 | "Bold Color" : { 34 | "Red Component" : 0.92150187492370605, 35 | "Color Space" : "Calibrated", 36 | "Blue Component" : 0.92148995399475098, 37 | "Alpha Component" : 1, 38 | "Green Component" : 0.92147433757781982 39 | }, 40 | "Ansi 9 Color" : { 41 | "Red Component" : 0.95683503150939941, 42 | "Color Space" : "Calibrated", 43 | "Blue Component" : 0.3728577196598053, 44 | "Alpha Component" : 1, 45 | "Green Component" : 0 46 | }, 47 | "Horizontal Spacing" : 1, 48 | "Right Option Key Sends" : 0, 49 | "Rows" : 25, 50 | "Default Bookmark" : "No", 51 | "Cursor Guide Color" : { 52 | "Red Component" : 0.64999997615814209, 53 | "Color Space" : "Calibrated", 54 | "Blue Component" : 1, 55 | "Alpha Component" : 0.25, 56 | "Green Component" : 0.9100000262260437 57 | }, 58 | "Non-ASCII Anti Aliased" : true, 59 | "Use Bright Bold" : true, 60 | "Ansi 10 Color" : { 61 | "Red Component" : 0.59473341703414917, 62 | "Color Space" : "Calibrated", 63 | "Blue Component" : 0.14004382491111755, 64 | "Alpha Component" : 1, 65 | "Green Component" : 0.87921047210693359 66 | }, 67 | "Ambiguous Double Width" : false, 68 | "Jobs to Ignore" : [ 69 | "rlogin", 70 | "ssh", 71 | "slogin", 72 | "telnet" 73 | ], 74 | "Ansi 15 Color" : { 75 | "Red Component" : 0.96537256240844727, 76 | "Color Space" : "Calibrated", 77 | "Blue Component" : 0.9359474778175354, 78 | "Alpha Component" : 1, 79 | "Green Component" : 0.96549534797668457 80 | }, 81 | "Foreground Color" : { 82 | "Red Component" : 0.8493925929069519, 83 | "Color Space" : "Calibrated", 84 | "Blue Component" : 0.84938156604766846, 85 | "Alpha Component" : 1, 86 | "Green Component" : 0.84936714172363281 87 | }, 88 | "Working Directory" : "\/Users\/jh3y", 89 | "Use Tab Color" : false, 90 | "Blinking Cursor" : true, 91 | "Disable Window Resizing" : true, 92 | "Sync Title" : false, 93 | "Prompt Before Closing 2" : false, 94 | "BM Growl" : true, 95 | "Command" : "", 96 | "Description" : "Default", 97 | "Mouse Reporting" : true, 98 | "Screen" : -1, 99 | "Selection Color" : { 100 | "Red Component" : 0.20521381497383118, 101 | "Color Space" : "Calibrated", 102 | "Blue Component" : 0.20521116256713867, 103 | "Alpha Component" : 1, 104 | "Green Component" : 0.20520767569541931 105 | }, 106 | "Only The Default BG Color Uses Transparency" : true, 107 | "Columns" : 80, 108 | "Idle Code" : 0, 109 | "Ansi 13 Color" : { 110 | "Red Component" : 0.95683503150939941, 111 | "Color Space" : "Calibrated", 112 | "Blue Component" : 0.3728577196598053, 113 | "Alpha Component" : 1, 114 | "Green Component" : 0 115 | }, 116 | "Custom Command" : "No", 117 | "ASCII Anti Aliased" : true, 118 | "Non Ascii Font" : "Monaco 12", 119 | "Vertical Spacing" : 1, 120 | "Use Bold Font" : true, 121 | "Option Key Sends" : 0, 122 | "Selected Text Color" : { 123 | "Red Component" : 1, 124 | "Color Space" : "Calibrated", 125 | "Blue Component" : 0.99999129772186279, 126 | "Alpha Component" : 1, 127 | "Green Component" : 0.99997437000274658 128 | }, 129 | "Background Color" : { 130 | "Red Component" : 0.046698093414306641, 131 | "Color Space" : "Calibrated", 132 | "Blue Component" : 0.046697486191987991, 133 | "Alpha Component" : 1, 134 | "Green Component" : 0.046696696430444717 135 | }, 136 | "Character Encoding" : 4, 137 | "Ansi 11 Color" : { 138 | "Red Component" : 0.87748134136199951, 139 | "Color Space" : "Calibrated", 140 | "Blue Component" : 0.38154411315917969, 141 | "Alpha Component" : 1, 142 | "Green Component" : 0.83635991811752319 143 | }, 144 | "Use Italic Font" : true, 145 | "Unlimited Scrollback" : false, 146 | "Keyboard Map" : { 147 | "0xf700-0x260000" : { 148 | "Action" : 10, 149 | "Text" : "[1;6A" 150 | }, 151 | "0x37-0x40000" : { 152 | "Action" : 11, 153 | "Text" : "0x1f" 154 | }, 155 | "0x32-0x40000" : { 156 | "Action" : 11, 157 | "Text" : "0x00" 158 | }, 159 | "0xf709-0x20000" : { 160 | "Action" : 10, 161 | "Text" : "[17;2~" 162 | }, 163 | "0xf70c-0x20000" : { 164 | "Action" : 10, 165 | "Text" : "[20;2~" 166 | }, 167 | "0xf729-0x20000" : { 168 | "Action" : 10, 169 | "Text" : "[1;2H" 170 | }, 171 | "0xf72b-0x40000" : { 172 | "Action" : 10, 173 | "Text" : "[1;5F" 174 | }, 175 | "0xf705-0x20000" : { 176 | "Action" : 10, 177 | "Text" : "[1;2Q" 178 | }, 179 | "0xf703-0x260000" : { 180 | "Action" : 10, 181 | "Text" : "[1;6C" 182 | }, 183 | "0xf700-0x220000" : { 184 | "Action" : 10, 185 | "Text" : "[1;2A" 186 | }, 187 | "0xf701-0x280000" : { 188 | "Action" : 11, 189 | "Text" : "0x1b 0x1b 0x5b 0x42" 190 | }, 191 | "0x38-0x40000" : { 192 | "Action" : 11, 193 | "Text" : "0x7f" 194 | }, 195 | "0x33-0x40000" : { 196 | "Action" : 11, 197 | "Text" : "0x1b" 198 | }, 199 | "0xf703-0x220000" : { 200 | "Action" : 10, 201 | "Text" : "[1;2C" 202 | }, 203 | "0xf701-0x240000" : { 204 | "Action" : 10, 205 | "Text" : "[1;5B" 206 | }, 207 | "0xf70d-0x20000" : { 208 | "Action" : 10, 209 | "Text" : "[21;2~" 210 | }, 211 | "0xf702-0x260000" : { 212 | "Action" : 10, 213 | "Text" : "[1;6D" 214 | }, 215 | "0xf729-0x40000" : { 216 | "Action" : 10, 217 | "Text" : "[1;5H" 218 | }, 219 | "0xf706-0x20000" : { 220 | "Action" : 10, 221 | "Text" : "[1;2R" 222 | }, 223 | "0x34-0x40000" : { 224 | "Action" : 11, 225 | "Text" : "0x1c" 226 | }, 227 | "0xf700-0x280000" : { 228 | "Action" : 11, 229 | "Text" : "0x1b 0x1b 0x5b 0x41" 230 | }, 231 | "0x2d-0x40000" : { 232 | "Action" : 11, 233 | "Text" : "0x1f" 234 | }, 235 | "0xf70e-0x20000" : { 236 | "Action" : 10, 237 | "Text" : "[23;2~" 238 | }, 239 | "0xf702-0x220000" : { 240 | "Action" : 10, 241 | "Text" : "[1;2D" 242 | }, 243 | "0xf703-0x280000" : { 244 | "Action" : 11, 245 | "Text" : "0x1b 0x1b 0x5b 0x43" 246 | }, 247 | "0xf700-0x240000" : { 248 | "Action" : 10, 249 | "Text" : "[1;5A" 250 | }, 251 | "0xf707-0x20000" : { 252 | "Action" : 10, 253 | "Text" : "[1;2S" 254 | }, 255 | "0xf70a-0x20000" : { 256 | "Action" : 10, 257 | "Text" : "[18;2~" 258 | }, 259 | "0x35-0x40000" : { 260 | "Action" : 11, 261 | "Text" : "0x1d" 262 | }, 263 | "0xf70f-0x20000" : { 264 | "Action" : 10, 265 | "Text" : "[24;2~" 266 | }, 267 | "0xf703-0x240000" : { 268 | "Action" : 10, 269 | "Text" : "[1;5C" 270 | }, 271 | "0xf701-0x260000" : { 272 | "Action" : 10, 273 | "Text" : "[1;6B" 274 | }, 275 | "0xf702-0x280000" : { 276 | "Action" : 11, 277 | "Text" : "0x1b 0x1b 0x5b 0x44" 278 | }, 279 | "0xf72b-0x20000" : { 280 | "Action" : 10, 281 | "Text" : "[1;2F" 282 | }, 283 | "0x36-0x40000" : { 284 | "Action" : 11, 285 | "Text" : "0x1e" 286 | }, 287 | "0xf708-0x20000" : { 288 | "Action" : 10, 289 | "Text" : "[15;2~" 290 | }, 291 | "0xf701-0x220000" : { 292 | "Action" : 10, 293 | "Text" : "[1;2B" 294 | }, 295 | "0xf70b-0x20000" : { 296 | "Action" : 10, 297 | "Text" : "[19;2~" 298 | }, 299 | "0xf702-0x240000" : { 300 | "Action" : 10, 301 | "Text" : "[1;5D" 302 | }, 303 | "0xf704-0x20000" : { 304 | "Action" : 10, 305 | "Text" : "[1;2P" 306 | } 307 | }, 308 | "Window Type" : 0, 309 | "Cursor Type" : 0, 310 | "Background Image Location" : "", 311 | "Blur" : false, 312 | "Badge Color" : { 313 | "Red Component" : 1, 314 | "Color Space" : "Calibrated", 315 | "Blue Component" : 0, 316 | "Alpha Component" : 0.5, 317 | "Green Component" : 0 318 | }, 319 | "Scrollback Lines" : 1000, 320 | "Send Code When Idle" : false, 321 | "Close Sessions On End" : true, 322 | "Terminal Type" : "xterm-256color", 323 | "Visual Bell" : true, 324 | "Flashing Bell" : false, 325 | "Silence Bell" : false, 326 | "Ansi 14 Color" : { 327 | "Red Component" : 0.34416967630386353, 328 | "Color Space" : "Calibrated", 329 | "Blue Component" : 0.92060363292694092, 330 | "Alpha Component" : 1, 331 | "Green Component" : 0.81977206468582153 332 | }, 333 | "ASCII Ligatures" : true, 334 | "Name" : "jh3y", 335 | "Cursor Text Color" : { 336 | "Red Component" : 0, 337 | "Color Space" : "Calibrated", 338 | "Blue Component" : 0, 339 | "Alpha Component" : 1, 340 | "Green Component" : 0 341 | }, 342 | "Minimum Contrast" : 0, 343 | "Shortcut" : "", 344 | "Cursor Color" : { 345 | "Red Component" : 0.99016290903091431, 346 | "Color Space" : "Calibrated", 347 | "Blue Component" : 0.12078898400068283, 348 | "Alpha Component" : 1, 349 | "Green Component" : 0.59354037046432495 350 | }, 351 | "Transparency" : 0.26231559327411169, 352 | "Ansi 1 Color" : { 353 | "Red Component" : 0.95683503150939941, 354 | "Color Space" : "Calibrated", 355 | "Blue Component" : 0.3728577196598053, 356 | "Alpha Component" : 1, 357 | "Green Component" : 0 358 | }, 359 | "Ansi 2 Color" : { 360 | "Red Component" : 0.59473341703414917, 361 | "Color Space" : "Calibrated", 362 | "Blue Component" : 0.14004382491111755, 363 | "Alpha Component" : 1, 364 | "Green Component" : 0.87921047210693359 365 | }, 366 | "Ansi 3 Color" : { 367 | "Red Component" : 0.99215686321258545, 368 | "Color Space" : "Calibrated", 369 | "Blue Component" : 0.12156862765550613, 370 | "Alpha Component" : 1, 371 | "Green Component" : 0.59215688705444336 372 | }, 373 | "Ansi 4 Color" : { 374 | "Red Component" : 0.61468899250030518, 375 | "Color Space" : "Calibrated", 376 | "Blue Component" : 0.99877572059631348, 377 | "Alpha Component" : 1, 378 | "Green Component" : 0.39599207043647766 379 | }, 380 | "Ansi 5 Color" : { 381 | "Red Component" : 0.95683503150939941, 382 | "Color Space" : "Calibrated", 383 | "Blue Component" : 0.3728577196598053, 384 | "Alpha Component" : 1, 385 | "Green Component" : 0 386 | }, 387 | "Use Non-ASCII Font" : false, 388 | "Ansi 6 Color" : { 389 | "Red Component" : 0.34416967630386353, 390 | "Color Space" : "Calibrated", 391 | "Blue Component" : 0.92060363292694092, 392 | "Alpha Component" : 1, 393 | "Green Component" : 0.81977206468582153 394 | }, 395 | "Normal Font" : "JetBrainsMono-Regular 13", 396 | "Custom Directory" : "Recycle", 397 | "Ansi 0 Color" : { 398 | "Red Component" : 0.10051589459180832, 399 | "Color Space" : "Calibrated", 400 | "Blue Component" : 0.10051459074020386, 401 | "Alpha Component" : 1, 402 | "Green Component" : 0.10051288455724716 403 | }, 404 | "Guid" : "E232933F-682C-433D-940F-7AFFE691A678" 405 | } -------------------------------------------------------------------------------- /scripts/links/spectacle/Shortcuts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "shortcut_key_binding" : "alt+shift+cmd+z", 4 | "shortcut_name" : "RedoLastMove" 5 | }, 6 | { 7 | "shortcut_key_binding" : null, 8 | "shortcut_name" : "MakeSmaller" 9 | }, 10 | { 11 | "shortcut_key_binding" : "ctrl+alt+p", 12 | "shortcut_name" : "MoveToPreviousThird" 13 | }, 14 | { 15 | "shortcut_key_binding" : null, 16 | "shortcut_name" : "MoveToUpperRight" 17 | }, 18 | { 19 | "shortcut_key_binding" : "ctrl+alt+down", 20 | "shortcut_name" : "MoveToBottomHalf" 21 | }, 22 | { 23 | "shortcut_key_binding" : null, 24 | "shortcut_name" : "MoveToNextDisplay" 25 | }, 26 | { 27 | "shortcut_key_binding" : "ctrl+alt+up", 28 | "shortcut_name" : "MoveToTopHalf" 29 | }, 30 | { 31 | "shortcut_key_binding" : null, 32 | "shortcut_name" : "MoveToLowerLeft" 33 | }, 34 | { 35 | "shortcut_key_binding" : null, 36 | "shortcut_name" : "MakeLarger" 37 | }, 38 | { 39 | "shortcut_key_binding" : "alt+cmd+z", 40 | "shortcut_name" : "UndoLastMove" 41 | }, 42 | { 43 | "shortcut_key_binding" : "ctrl+alt+cmd+left", 44 | "shortcut_name" : "MoveToPreviousDisplay" 45 | }, 46 | { 47 | "shortcut_key_binding" : "ctrl+alt+f", 48 | "shortcut_name" : "MoveToFullscreen" 49 | }, 50 | { 51 | "shortcut_key_binding" : "ctrl+alt+n", 52 | "shortcut_name" : "MoveToNextThird" 53 | }, 54 | { 55 | "shortcut_key_binding" : "ctrl+alt+left", 56 | "shortcut_name" : "MoveToLeftHalf" 57 | }, 58 | { 59 | "shortcut_key_binding" : "ctrl+alt+c", 60 | "shortcut_name" : "MoveToCenter" 61 | }, 62 | { 63 | "shortcut_key_binding" : "ctrl+alt+right", 64 | "shortcut_name" : "MoveToRightHalf" 65 | }, 66 | { 67 | "shortcut_key_binding" : null, 68 | "shortcut_name" : "MoveToLowerRight" 69 | }, 70 | { 71 | "shortcut_key_binding" : null, 72 | "shortcut_name" : "MoveToUpperLeft" 73 | } 74 | ] -------------------------------------------------------------------------------- /scripts/links/sublime/Default (OSX).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | { "keys": ["ctrl+alt+b"], "command": "js_prettier" } 3 | ] 4 | -------------------------------------------------------------------------------- /scripts/links/sublime/Emmet.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "telemetry": false, 3 | "uid": "aeecbedc-9ccb-4a00-878e-c518edd83560", 4 | } 5 | -------------------------------------------------------------------------------- /scripts/links/sublime/Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "bootstrapped": true, 3 | "in_process_packages": 4 | [ 5 | ], 6 | "installed_packages": 7 | [ 8 | "Astro", 9 | "Emmet", 10 | "FileIcons", 11 | "JsPrettier", 12 | "LSP", 13 | "LSP-astro", 14 | "LSP-tailwindcss", 15 | "LSP-typescript", 16 | "Markdown Extended", 17 | "MDX", 18 | "Night Owl", 19 | "Package Control", 20 | "Pug", 21 | "Stylus", 22 | "Tailwind CSS", 23 | ], 24 | } 25 | -------------------------------------------------------------------------------- /scripts/links/sublime/Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | // Settings in here override those in "Default/Preferences.sublime-settings", 2 | // and are overridden in turn by syntax-specific settings. 3 | { 4 | "color_scheme": "Night Owl.sublime-color-scheme", 5 | "theme": "auto", 6 | // "font_size": 20, 7 | "font_size": 12, 8 | "font_face": "JetBrains Mono", 9 | "show_rel_path": true, 10 | "tab_size": 2, 11 | "translate_tabs_to_spaces": true, 12 | "scroll_past_end": 0.95, 13 | "ignored_packages": 14 | [ 15 | "Vintage", 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /scripts/links/vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "key": "shift+cmd+t", 3 | "command": "workbench.action.tasks.runTask", 4 | "when": "editorTextFocus" 5 | }] -------------------------------------------------------------------------------- /scripts/links/vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.tabSize": 2, 3 | "editor.insertSpaces": true, 4 | "editor.minimap.enabled": true, 5 | "editor.minimap.maxColumn": 120, 6 | "editor.wordWrapColumn": 80, 7 | "editor.cursorBlinking": "expand", 8 | "editor.fontLigatures": true, 9 | "editor.renderWhitespace": "boundary", 10 | "emojisense.emojiDecoratorsEnabled": true, 11 | "emojisense.markupCompletionsEnabled": true, 12 | "emojisense.unicodeCompletionsEnabled": true, 13 | "emojisense.showOnColon": true, 14 | "emojisense.languages": { 15 | "markdown": true, 16 | "javascript": true, 17 | "jade": true, 18 | "html": true, 19 | "makefile": true, 20 | "plaintext": { 21 | "markupCompletionsEnabled": false, 22 | "emojiDecoratorsEnabled": false 23 | }, 24 | "git-commit": true 25 | }, 26 | "window.title": "${activeEditorMedium}${separator}${rootName}", 27 | "files.trimTrailingWhitespace": true, 28 | "telemetry.enableTelemetry": false, 29 | "telemetry.enableCrashReporter": false, 30 | "atomKeymap.promptV3Features": true, 31 | "prettier.parser": "flow", 32 | "prettier.semi": false, 33 | "prettier.printWidth": 80, 34 | "prettier.trailingComma": "es5", 35 | "prettier.singleQuote": true, 36 | "prettier.jsxBracketSameLine": true, 37 | "gitlens.advanced.messages": { 38 | "suppressCommitHasNoPreviousCommitWarning": false, 39 | "suppressCommitNotFoundWarning": false, 40 | "suppressFileNotUnderSourceControlWarning": false, 41 | "suppressGitVersionWarning": false, 42 | "suppressLineUncommittedWarning": false, 43 | "suppressNoRepositoryWarning": false, 44 | "suppressResultsExplorerNotice": false, 45 | "suppressShowKeyBindingsNotice": true, 46 | "suppressUpdateNotice": false, 47 | "suppressWelcomeNotice": true 48 | }, 49 | "gitlens.historyExplorer.enabled": true, 50 | "javascript.updateImportsOnFileMove.enabled": "always", 51 | "explorer.confirmDragAndDrop": false, 52 | "[javascript]": { 53 | "editor.defaultFormatter": "esbenp.prettier-vscode" 54 | }, 55 | "[json]": { 56 | "editor.defaultFormatter": "esbenp.prettier-vscode" 57 | }, 58 | "[typescriptreact]": { 59 | "editor.defaultFormatter": "esbenp.prettier-vscode" 60 | }, 61 | "[typescript]": { 62 | "editor.defaultFormatter": "esbenp.prettier-vscode" 63 | }, 64 | "[html]": { 65 | "editor.defaultFormatter": "esbenp.prettier-vscode" 66 | }, 67 | "peacock.favoriteColors": [ 68 | { 69 | "name": "Angular Red", 70 | "value": "#b52e31" 71 | }, 72 | { 73 | "name": "Auth0 Orange", 74 | "value": "#eb5424" 75 | }, 76 | { 77 | "name": "Azure Blue", 78 | "value": "#007fff" 79 | }, 80 | { 81 | "name": "C# Purple", 82 | "value": "#68217A" 83 | }, 84 | { 85 | "name": "Gatsby Purple", 86 | "value": "#639" 87 | }, 88 | { 89 | "name": "Go Cyan", 90 | "value": "#5dc9e2" 91 | }, 92 | { 93 | "name": "Java Blue-Gray", 94 | "value": "#557c9b" 95 | }, 96 | { 97 | "name": "JavaScript Yellow", 98 | "value": "#f9e64f" 99 | }, 100 | { 101 | "name": "Mandalorian Blue", 102 | "value": "#1857a4" 103 | }, 104 | { 105 | "name": "Node Green", 106 | "value": "#215732" 107 | }, 108 | { 109 | "name": "React Blue", 110 | "value": "#00b3e6" 111 | }, 112 | { 113 | "name": "Something Different", 114 | "value": "#832561" 115 | }, 116 | { 117 | "name": "Vue Green", 118 | "value": "#42b883" 119 | } 120 | ], 121 | "vsicons.dontShowNewVersionMessage": true, 122 | "terminal.integrated.rendererType": "dom", 123 | "editor.fontFamily": "'JetBrains Mono', Menlo, Monaco, 'Courier New', monospace", 124 | "workbench.colorTheme": "Night Owl", 125 | "explorer.confirmDelete": false, 126 | "editor.codeActionsOnSave": null, 127 | // Egghead.io screencasting settings 128 | "editor.minimap.enabled": false, 129 | "explorer.confirmDragAndDrop": false, 130 | "editor.fontSize": 20, 131 | "terminal.integrated.fontSize": 20, 132 | "workbench.activityBar.visible": false, 133 | "editor.quickSuggestions": { 134 | "comments": "off", 135 | "strings": "off", 136 | "other": "off" 137 | }, 138 | "editor.suggestOnTriggerCharacters": false, 139 | "editor.wordBasedSuggestions": false, 140 | "editor.quickSuggestionsDelay": 1000000, 141 | "editor.parameterHints.enabled": false, 142 | "workbench.statusBar.visible": false, 143 | "terminal.integrated.env.osx": { 144 | "FIG_NEW_SESSION": "1" 145 | }, 146 | "editor.guides.indentation": true, 147 | } -------------------------------------------------------------------------------- /scripts/osx.js: -------------------------------------------------------------------------------- 1 | // Menu: OSX Defaults 2 | // Description: Set OSX defaults from Shell script. 3 | // Author: Jhey Tompkins 4 | // Twitter: @jh3yy 5 | // const $HOME = exec('echo $HOME', { silent: true }).trim() 6 | const $HOME = home() 7 | console.info('Setting OSX Defaults') 8 | await exec(`sh ${$HOME}/.kenv/kenvs/my-script-kit/scripts/kody/osx.sh`) 9 | console.info('OSX defaults set') -------------------------------------------------------------------------------- /scripts/setup.js: -------------------------------------------------------------------------------- 1 | // Menu: Setup! 2 | // Description: Setup my machine. 3 | // Author: Jhey Tompkins 4 | // Twitter: @jh3yy 5 | 6 | // const $HOME = exec('echo $HOME', { silent: false }) 7 | const $HOME = home() 8 | const INSTALL_SCRIPT = 9 | 'https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh' 10 | await exec('chsh -s $(which zsh)') 11 | await exec(`sh -c "$(curl -fsSL ${INSTALL_SCRIPT})"`) 12 | 13 | console.info(home(), 'HOME') 14 | 15 | // const CONFIG = await readFile(`${$HOME}/.kenv/kenvs/my-script-kit/scripts/kody/config.json`, 'utf-8') 16 | // const { extensions, npm } = JSON.parse(CONFIG) 17 | // // Set up VsCode 18 | // const CODE_INSTALLED = await which('code') 19 | // if (CODE_INSTALLED) { 20 | // if (extensions && extensions.length) { 21 | // for (const EXT of extensions) { 22 | // await exec(`code --install-extension ${EXT}`) 23 | // } 24 | // } 25 | // } 26 | // // Install NPM modules 27 | // const NPM_INSTALLED = await which('npm') 28 | // if (NPM_INSTALLED) { 29 | // if (npm && npm.length) { 30 | // for (const MOD of npm) { 31 | // await exec(`npm i -g ${MOD}`) 32 | // } 33 | // } 34 | // } 35 | 36 | // import "@johnlindquist/kit" 37 | 38 | // let { stdout } = await exec('echo $HOME') 39 | // await div(stdout) -------------------------------------------------------------------------------- /scripts/svgo.js: -------------------------------------------------------------------------------- 1 | // Menu: SVGO 2 | // Description: Optimize SVG on drop 3 | // Author: Jhey Tompkins 4 | // Twitter: @jh3yy 5 | 6 | let [svg] = await arg("Drop SVG") 7 | 8 | console.info(svg) -------------------------------------------------------------------------------- /templates/codepen/dev.pug: -------------------------------------------------------------------------------- 1 | h1 Hello World! -------------------------------------------------------------------------------- /templates/codepen/index.pug: -------------------------------------------------------------------------------- 1 | html 2 | head 3 | meta(charset="utf-8") 4 | meta(http-equiv="X-UA-Compatible", content="IE=edge") 5 | title {{name}} 6 | meta(name="viewport", content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1.0") 7 | link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css') 8 | link(rel='stylesheet', href='style.css') 9 | body 10 | include dev.pug 11 | script(type="module" src="script.js") 12 | -------------------------------------------------------------------------------- /templates/codepen/script.js: -------------------------------------------------------------------------------- 1 | // 404 2 | -------------------------------------------------------------------------------- /templates/codepen/style.styl: -------------------------------------------------------------------------------- 1 | * 2 | *:after 3 | *:before 4 | box-sizing border-box 5 | 6 | body 7 | min-height 100vh 8 | display grid 9 | place-items center -------------------------------------------------------------------------------- /templates/default.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jh3y/my-script-kit/ce1d4052ae960be344fd60e17637ab548b60fce3/templates/default.js -------------------------------------------------------------------------------- /templates/test.js: -------------------------------------------------------------------------------- 1 | let { default: kill } = await npm("tree-kill") 2 | let { default: cleanup } = await npm("node-cleanup") 3 | 4 | await trash([ 5 | kenvPath("scripts", "testing-tutorial.js"), 6 | kenvPath("bin", "testing-tutorial"), 7 | kenvPath("scripts", "new-default.js"), 8 | kenvPath("bin", "new-default"), 9 | ]) 10 | 11 | let response = await get( 12 | `https://api.github.com/repos/johnlindquist/kit` 13 | ) 14 | echo(response.data.name + " is working!") 15 | 16 | if (response.data.name != "kit") { 17 | exit() 18 | } 19 | echo(` 20 | 21 | ---"new" passed--- 22 | 23 | ---starting "tutorial"--- 24 | 25 | `) 26 | 27 | //---------------------- 28 | 29 | let TUTORIAL_CONTENT_PATH = kenvPath("tmp") 30 | await cli("set-env-var", "KIT_TEMPLATE", "tutorial") 31 | await cli( 32 | "set-env-var", 33 | "TUTORIAL_CONTENT_PATH", 34 | TUTORIAL_CONTENT_PATH 35 | ) 36 | 37 | let testingTutorial = "testing-tutorial" 38 | await cli("new", testingTutorial, "--trust", "--no-edit") 39 | 40 | let testingTutorialFilePath = path.join( 41 | kenvPath("scripts"), 42 | testingTutorial + ".js" 43 | ) 44 | let tutorialContent = await readFile( 45 | testingTutorialFilePath, 46 | "utf8" 47 | ) 48 | 49 | let tutorialContentBuffer = await readFile( 50 | testingTutorialFilePath 51 | ) 52 | let tutorialTemplateBuffer = await readFile( 53 | kenvPath("templates", "tutorial.js") 54 | ) 55 | 56 | if ( 57 | Buffer.compare( 58 | tutorialContentBuffer, 59 | tutorialTemplateBuffer 60 | ) 61 | ) { 62 | echo(`successfully used tutorial template`) 63 | } else { 64 | echo(`tutorial content and template don't match...`) 65 | echo(tutorialContent) 66 | echo("-------------------") 67 | echo(tutorialTemplateContent) 68 | exit() 69 | } 70 | 71 | tutorialContent = tutorialContent.replaceAll(/^\/\//gm, "") 72 | await cli( 73 | "set-env-var", 74 | "TUTORIAL_CONTENT_PATH", 75 | TUTORIAL_CONTENT_PATH 76 | ) 77 | 78 | await writeFile(testingTutorialFilePath, tutorialContent) 79 | let testingTutorialChild = spawnSync( 80 | testingTutorial, 81 | ["johnlindquist", "--trust", "--no-edit"], 82 | { 83 | stdio: "inherit", 84 | env: { 85 | TUTORIAL_CONTENT_PATH, 86 | ...env, 87 | }, 88 | } 89 | ) 90 | 91 | echo(`"tutorial" passed`) 92 | 93 | //--------------------- 94 | 95 | console.log("bin:", ls(kenvPath("bin")).toString()) 96 | console.log("PATH:", env.PATH) 97 | 98 | let newDefault = "new-default" 99 | let newChild = spawnSync( 100 | `new`, 101 | [newDefault, "--trust", "--no-edit"], 102 | { 103 | stdio: "inherit", 104 | env: { 105 | PATH: kenvPath("bin") + ":" + env.PATH, 106 | }, 107 | } 108 | ) 109 | 110 | console.log("scripts:", ls(kenvPath("scripts")).toString()) 111 | console.log("new:", which("new")) 112 | 113 | let newDefaultContentPath = kenvPath( 114 | "scripts", 115 | newDefault + ".js" 116 | ) 117 | let newDefaultBuffer = await readFile(newDefaultContentPath) 118 | 119 | let defaultTemplateBuffer = await readFile( 120 | kenvPath("templates", "default.js") 121 | ) 122 | 123 | if ( 124 | Buffer.compare(newDefaultBuffer, defaultTemplateBuffer) 125 | ) { 126 | echo( 127 | `"new" passed (used default template after tutorial)` 128 | ) 129 | } else { 130 | echo(await readFile(newDefaultContentPath, "utf8")) 131 | exit() 132 | } 133 | -------------------------------------------------------------------------------- /templates/text.js: -------------------------------------------------------------------------------- 1 | let { getSelectedText, setSelectedText } = await kit("text") 2 | -------------------------------------------------------------------------------- /templates/tutorial.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Congratulations! You made a `{{name}}` script! 🎉 3 | * 4 | * 1. Follow the instructions in the comments below. 5 | * 2. Run `{{name}}` in the prompt after each step: 6 | * Reminder: The prompt can be invoked with cmd+; 7 | */ 8 | 9 | //Find console.log messages in ~/.kenv/logs/console.log 10 | console.log(`{{USER}} made a {{name}} script!`) 11 | 12 | /** 13 | * Step 1: Accept an argument and show the result 14 | * 1. Uncomment the 2 lines "let user" and "show" 15 | * 2. Run `{{name}}` in your prompt again 16 | */ 17 | 18 | // let user = await arg("Type your github username:") 19 | // show(`

You typed: ${user}

`) 20 | 21 | /** 22 | * Step 2: Fetch data from the github api 23 | * 1. Comment out the `show` line above 24 | * 1. Uncomment lines the 2 lines "let response" and "inspect" 25 | * 2. Run `{{name}}` again 26 | */ 27 | 28 | // let response = await get(`https://api.github.com/users/${user}`) 29 | // inspect(response.data) 30 | 31 | /** 32 | * Step 3: Write your data to a template 33 | * 1. Comment out the `show` line above 34 | * 2. Uncomment the lines from "contentPath" to "edit" 35 | * 3. Run `{{name}} {{USER}}` again 36 | * Note: a prompt will ask you to select a directory for your file 37 | */ 38 | 39 | // let contentPath = await env("TUTORIAL_CONTENT_PATH", { message: 'Write file to:? e.g. "~/.kenv/tmp"'}) 40 | // let content = await compileTemplate("tutorial.md", { name: response.data.name }) 41 | // let filePath = path.join(contentPath, `${user}.md`) 42 | // await writeFile(filePath, content) 43 | // await edit(filePath) 44 | -------------------------------------------------------------------------------- /templates/tutorial.md: -------------------------------------------------------------------------------- 1 | # Congratulations! {{name}} 🏆 2 | 3 | Welcome to the wonderful world of **Script Kit**! 4 | _Happy Scripting!_ 🤓 - John Lindquist @johnlindquist 5 | -------------------------------------------------------------------------------- /templates/with-metadata.js: -------------------------------------------------------------------------------- 1 | //Menu: 2 | //Description: 3 | //Shortcut: 4 | --------------------------------------------------------------------------------