Skip to content

Instantly share code, notes, and snippets.

Kevin Reed kavun

View GitHub Profile
@kavun
kavun / dracula-slack
Last active Apr 6, 2020
dark mode slack theme with splashes of https://github.com/dracula/dracula-theme/, using #1a1d21 instead of #282a36 for the background to match the main chat area background
View dracula-slack
old:
#1A1D21,#30363D,#30363D,#F1FA8C,#30363D,#F8F8F2,#8BE9FD,#FF79C6
new:
#1A1D21,#30363D,#30363D,#F1FA8C,#30363D,#F8F8F2,#8BE9FD,#FF79C6,#1A1D21,#F8F8F2
View base-diff-origin.html
<!-- include this in the <head> -->
<base href="https://SITE_DOMAIN.com" />
<!-- include this at the end of the <body> -->
<script>
!(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
kavun / cloudSettings
Last active Jun 9, 2020
vscode-settings
View cloudSettings
{"lastUpload":"2020-06-09T16:16:49.567Z","extensionVersion":"v3.4.3"}
View lower.sh
if [[ -d $1 ]]; then
if [[ -d $1/.git ]]; then
cd $1
dirn=${PWD##*/};
today=`date '+%Y%m%d%H%M%S'`;
filen='./../'$dirn'_BeforeCaseChange_'$today'.zip';
echo 'Backing up '$dirn' to '$filen
zip -rq $filen .
@kavun
kavun / git-cheatsheet.md
Last active Feb 22, 2018
git cheatsheet
View git-cheatsheet.md

Git Cheatsheet

for sourcetree users

basics

  • 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>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
@kavun
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: http://bradconte.com/cc_generator.html.
View Credit Card Generator
javascript:
!(function () {
/*
Copyright (c) 2015, Brad Conte (http:bradconte.com)
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="https://kevinsw.localtunnel.me/app_services/auth-silent-post.aspx"/>
<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.