Skip to content

Instantly share code, notes, and snippets.

John Elliott johnelliott

  • Brooklyn, NY
Block or report user

Report or block johnelliott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 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 / chrome.service
Last active Apr 30, 2019
Raspi TV Web Dashboard
View chrome.service
[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 / create-macos-solid-color.sh
Created Mar 31, 2019
macOS desktop background solid color imagemagick script
View create-macos-solid-color.sh
#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 / pokey-graceful-express.js
Last active Mar 27, 2019
Node.js Express Graceful shutdown Kubernetes
View pokey-graceful-express.js
require('dotenv').config()
const http = require('http')
const express = require('express')
const app = express()
// Routes
app.get('/', function (req, res, next) {
console.log('got request')
setTimeout(function timeoutDone () {
View gist:3edc82f4433dfeb2f3c8a3c269f4635a
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'
View fix-package-lock-http.sh
#! /bin/sh
find . -name node_modules -prune -or -name package-lock.json -exec sed --in-place=.backup --separate 's|http://|https://|g' {} +
View 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"
View index.html
<html>
<body>
hello
</body>
</html>
@johnelliott
johnelliott / vim-darkmode-example.vim
Created Dec 15, 2018
vim macOS dark mode example
View vim-darkmode-example.vim
" capture the current interface style
let g:apple_interface_style=system("defaults read -g AppleInterfaceStyle")
" run code based on the current interface style
if g:apple_interface_style ==? "dark\n"
set bg=dark
elseif g:apple_interface_style ==? "light\n"
set bg=light
endif
@johnelliott
johnelliott / facetime.sh
Created Nov 15, 2018
some FaceTime grab
View facetime.sh
ffmpeg -f avfoundation -r 23.999981 -s "1280x720" -i "0" out2.mp4
You can’t perform that action at this time.