Skip to content

Instantly share code, notes, and snippets.

@kavun
kavun / jsonvue-dracula.css
Created September 29, 2023 14:16
JSONVue Dracula Theme
body {
white-space: pre-wrap;
word-break: break-word;
font-family: monospace;
background-color: #282a36;
color: #f8f8f2;
}
.property {
font-weight: bold;
@kavun
kavun / dracula-slack
Last active January 14, 2021 20:10
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
old:
#1A1D21,#30363D,#30363D,#F1FA8C,#30363D,#F8F8F2,#8BE9FD,#FF79C6
new:
#1A1D21,#30363D,#30363D,#F1FA8C,#30363D,#F8F8F2,#8BE9FD,#FF79C6,#1A1D21,#F8F8F2
<!-- 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 / lower.sh
Last active April 17, 2018 15:33
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 February 22, 2018 19:58
git cheatsheet

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 --track /
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"
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
@kavun
kavun / index.html
Created March 29, 2016 13:10 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/zicigo
<!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 December 16, 2015 20:02 — 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.
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
@kavun
kavun / index.html
Created October 8, 2015 17:48
rOwWMe
<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>