Skip to content

Instantly share code, notes, and snippets.

View johnelliott's full-sized avatar
🕳️
tunneling

John Elliott johnelliott

🕳️
tunneling
View GitHub Profile
@johnelliott
johnelliott / html2jsonld
Created November 7, 2019 16:40
html2jsonld.sh
#!/usr/local/bin/bash
pup script[type=application/ld+json]|head -n2 |tail -n1|jq
@johnelliott
johnelliott / chrome.service
Last active April 30, 2019 22:09
Raspi TV Web Dashboard
[Unit]
Description="Start chromium datadog on startup"
PartOf=graphical.target
[Service]
# public url https://my.prom
ExecStart=/usr/bin/chromium-browser --kiosk --disable-session-crashed-bubble --incognito "https://my.prom"
Restart=always
RestartSec=3
@johnelliott
johnelliott / kubectlproxy.plist
Created April 16, 2019 22:21
kubectlproxy.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.kubelproxy.plist</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/kubectl</string>
<string>proxy</string>
@johnelliott
johnelliott / create-macos-solid-color.sh
Created March 31, 2019 02:13
macOS desktop background solid color imagemagick script
#convert is from imagemagick
convert "xc:#$1[128x128!]" /Library/Desktop\ Pictures/Solid\ Colors/$1.png
#TODO find out how to make icon preview same aspect ratio as apple images
@johnelliott
johnelliott / node_modules.sh
Last active March 27, 2019 22:21
node modules disk utilization
# List size of node_modules directories older than one year for projects in CWD
du -c -m -d 0 `find * -name node_modules -type d -maxdepth 1` |sort -n
Vim Colorschemes archive (ones I like)
'NLKNguyen/papercolor-theme'
'chriskempson/vim-tomorrow-theme'
'cormacrelf/vim-colors-github'
'jeffkreeftmeijer/vim-dim'
'jnurmine/Zenburn'
'lsdr/monokai'
'morhetz/gruvbox'
'nanotech/jellybeans.vim'
@johnelliott
johnelliott / gist:60b44e0cafb247abf59e
Last active March 19, 2019 14:00
Remove Docker contrainers with grep
Example: want to remove all things with ubuntu 14.04..
remove docker contrainers with grep:
```~/dev/practice/docker
$ docker ps -a |grep 14.04|cut -d" " -f 1|xargs -n 3 docker rm
ffefde7fe6ac
74f390d831e4
3c9750561f25
e34ab210baff
114af06a2e33
@johnelliott
johnelliott / lame-lighthouse-data.sh
Last active March 16, 2019 14:44
google lighthouse timings
find . -type f -name '*.json' | xargs -n1 -I % cat % |jq '[.finalUrl, .timing.total] '
#! /bin/sh
find . -name node_modules -prune -or -name package-lock.json -exec sed --in-place=.backup --separate 's|http://|https://|g' {} +
@johnelliott
johnelliott / John-vim-dim.vim
Created December 24, 2018 16:57
John-vim-dim.vim
highlight clear
if exists("syntax_on")
syntax reset
endif
exec "source " . expand('<sfile>:p:h') . "/default-light.vim"
let colors_name = "dim"