Skip to content

Instantly share code, notes, and snippets.

Kevin Reed kavun

View GitHub Profile
kavun / dracula-slack
Last active Apr 6, 2020
dark mode slack theme with splashes of, using #1a1d21 instead of #282a36 for the background to match the main chat area background
View dracula-slack
View base-diff-origin.html
<!-- include this in the <head> -->
<base href="" />
<!-- include this at the end of the <body> -->
!(function () {
function forceAbsoluteHashHrefs() {
// turn href="#..." into absolute hash links, since with <base> pointed
// to a different origin, any relative hash links will cause a browser navigation
kavun / cloudSettings
Last active Jun 9, 2020
View cloudSettings
if [[ -d $1 ]]; then
if [[ -d $1/.git ]]; then
cd $1
today=`date '+%Y%m%d%H%M%S'`;
echo 'Backing up '$dirn' to '$filen
zip -rq $filen .
kavun /
Last active Feb 22, 2018
git cheatsheet

Git Cheatsheet

for sourcetree users


  • list local branches git branch
  • git fetch origin
  • git pull origin <branch> (try with --ff-only first, so you can bail or change things if merge or rebase is needed)
  • git checkout <branch>
  • git checkout -b <branch> --track <remote>/<branch>
View gist:fbfd6d3487a4c054db32adc16bc2de74
ffmpeg -loop 1 -r 2 -i "image.jpg" -i "song.mp3" -vf scale=-1:380 -c:v libx264 -preset slow -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p -threads 0 "output.mkv"
View 1960-2016-Grammy-Best-Engi.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
Spotify URI,Track Name,Artist Name,Album Name,Disc Number,Track Number,Track Duration (ms),Added By,Added At
"spotify:track:4QD3bOaQOzNkwnKUlNWKad","Introduction / Darlin' Cora - Live","Harry Belafonte","Belafonte: At Carnegie Hall","1","1","241920","spotify:user:kavun","2016-01-20T16:38:21Z"
"spotify:track:31w1bMaRimIeYipDQ10Rhd","Sylvie - Live","Harry Belafonte","Belafonte: At Carnegie Hall","1","2","294360","spotify:user:kavun","2016-01-20T16:38:21Z"
"spotify:track:4gjBLqfNOUM8TDIvtAVl58","Cotton Fields - Live","Harry Belafonte","Belafonte: At Carnegie Hall","1","3","257013","spotify:user:kavun","2016-01-20T16:38:21Z"
"spotify:track:0iNZjjqvsCRcT4sZOa2WTp","John Henry - Live","Harry Belafonte","Belafonte: At Carnegie Hall","1","4","310733","spotify:user:kavun","2016-01-20T16:38:21Z"
"spotify:track:0dCr6cQVosSGdH8PXEOQP7","Take My Mother Home - Live","Harry Belafonte","Belafonte: At Carnegie Hall","1","5","310626","spotify:user:kavun","2016-01-20T16:38:21Z"
"spotify:track:3wLB0r0ay8W0PmCG0fWMuQ","The Marchi
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src=""></script>
kavun / Credit Card Generator
Last active Dec 16, 2015 — forked from B-Con/Credit Card Generator
This JavaScript function generates random number strings that pass the Luhn checksum, the test that credit card numbers must conform to. It assumes there is an HTML radio input to indicate which company issued the card. This code is from my webpage here:
View Credit Card Generator
!(function () {
Copyright (c) 2015, Brad Conte (
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright
View index.html
<label class="control-label">Form Action</label>
<input type="url" class="form-control" id="theURL" value=""/>
<h2>Silent Post Form</h2>
<form action="" method="post" id="theForm">
<div class="col-md-6 form-group"><input type="text" name="x_response_code" value="1"/></div>
<div class="col-md-6 form-group"><input type="text" name="x_response_subcode" value="1"/></div>
<div class="col-md-6 form-group"><input type="text" name="x_response_reason_code" value="1"/></div>
<div class="col-md-6 form-group"><input type="text" name="x_response_reason_text" value="This transaction has been approved."/></div>
<div class="col-md-6 form-group"><input type="text" name="x_auth_code" value=""/></div>
<div class="col-md-6 form-group"><input type="text" name="x_avs_code" value="P"/></div>
You can’t perform that action at this time.