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 / WSHRepl.js
Last active April 1, 2021 04:45
JScript in/out console for Windows Script Host
function print(text) {
WScript.Echo('> ' + text);
}
var stdin = WScript.StdIn;
var stdout = WScript.StdOut;
var input;
do {
var input = stdin.ReadLine();
@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 / AsyncHandler.ashx
Created July 29, 2015 13:43
Async Generic Handler for ASP.NET with HttpTaskAsyncHandler
<%@ WebHandler Language="C#" Class="AsyncHandler" %>
using System;
using System.Web;
using System.Threading.Tasks;
public class AsyncHandler : HttpTaskAsyncHandler {
public override async Task ProcessRequestAsync (HttpContext context) {
context.Response.ContentType = "text/plain";
@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>