Skip to content

Instantly share code, notes, and snippets.

View trapd00r's full-sized avatar
🐫
japh

magnus woldrich trapd00r

🐫
japh
View GitHub Profile
@RollingStar
RollingStar / beets_config.yaml
Created May 19, 2020 23:57
beets_config.yaml
# don't copy paste this into your config. It's tailored to me and I haven't really stress-tested it outside of my own use. Also, I was mostly using this in 2017-2019 and features may have changed.
# Some plugins have been retired and I haven't migrated yet. copyartifacts is the best example of this.
# Just use this as a starting point to learn about advanced, undocumented/poorly-documented features of beets.
directory: e:\Music\
library: e:\Music\beetslibrary.bib
#copyartifactspy3 chroma scrub
@steve-taylor
steve-taylor / theme-colors.html
Last active November 2, 2020 22:59
Theme color chooser
<!doctype html>
<html>
<head>
<style>
html, body {
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, 'Segoe UI', sans-serif;
}
.color-grid {
display: grid;
@kentfredric
kentfredric / scrape_photobucket.js
Created July 23, 2012 10:31
manipulate the source of a PhotoBucket album so that it can be easily mass-downloaded.
jQuery(function($){
// This is a script to manipulate the source of a PhotoBucket album so that it can be easily mass-downloaded.
// change the settings as per your requirements.
// copy-paste this source into your WebConsole ( in the WebDeveloper tools menu ) and run it, for great success.
var settings = {
images: false,
links: true,
description: true,
delete_original: true,
};
@trapd00r
trapd00r / gist:2407457
Last active October 3, 2015 06:18
vim build.sh
make distclean
export CPP_FLAGS="-DUSR_VIMRC_FILE=$XDG_CONFIG_HOME/vimrc -DUSR_EXRC_FILE=$XDG_CONFIG_HOME/exrc"
sh configure \
--disable-acl \
--disable-darwin \
--disable-gpm \
--disable-gtk2-check \
--disable-gtktest \
@dalpil
dalpil / gist:2184432
Created March 24, 2012 15:41
Ffmpeg screencasting
# Inspelning
ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 30 -s 800x600 -i :0.0+0,15 -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
# aac + h264 + mp4
ffmpeg -i output.mkv -acodec libfaac -ab 96k -ac 1 -vcodec libx264 -vpre hq -crf 22 -threads 0 our-final-product.mp4
# vorbis + h264 + mkv
ffmpeg -i output.mkv -acodec libvorbis -ab 96k -ac 1 -vcodec libx264 -vpre hq -crf 22 -threads 0 our-final-product.mkv
# 2 Pass h264 + matroska
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use vars qw($VERSION);
use Term::ExtendedColor::Xresources qw(get_xterm_color set_xterm_color);
my $colors = get_xterm_color(
{
index => [0..255],
@trapd00r
trapd00r / gist:1405506
Created November 29, 2011 16:52
urxvt build script
#!/bin/sh
# rxvt-unicode build script
# disable everything I don't need (pixmaps, transparency, xft...) while keeping
# it as xterm compatible as possible.
# Do note that you'd want to set the insecure resource to get at useful stuff
# like EWMH hints, urgency hint, underline color and most importantly, it makes
# OSC 50 querying work:
# printf "\e[50;?\a"; xxd
# This is enabled by default in xterm.
@Raimondi
Raimondi / syntax_snippets.vim
Created October 26, 2011 22:27
Some useful snippets for Vim syntax.
" Name of syntax item under the cursor
nore <leader>n :echo synIDattr(synID(line("."), col("."), 1), "name")<CR>
" Syntax stack of item under the cursor
nnore <leader>s :<C-U>echo join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), ' => ')<CR>
" Color of syntax item under the cursor
echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "fg")
* {
-webkit-border-radius: 0 !important;
-moz-border-radius: 0 !important;
border-radius: 0 !important;
-webkit-box-shadow: 0 !important;
-moz-box-shadow: 0 !important;
box-shadow: 0 !important;
-webkit-transition: none !important;