Skip to content

Instantly share code, notes, and snippets.

@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@cleverdevil
cleverdevil / markdown-to-email
Created January 4, 2014 01:06
markdown-to-email A simple script to send beautifully formatted emails that you write in Markdown. The email will have an HTML payload and a plain-text alternative, so you'll make everyone happy, including yourself.
#!/usr/bin/env python
'''
Send an multipart email with HTML and plain text alternatives. The message
should be constructed as a plain-text file of the following format:
From: Your Name <your@email.com>
To: Recipient One <recipient@to.com>
Subject: Your subject line
---
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active June 26, 2024 13:23
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@xeoncross
xeoncross / cr2_to_video.sh
Last active December 15, 2023 13:06
Converting a folder of .CR2 (Canon Raw Images) into a timelapse video on mac or linux
# Assuming your have installed the following:
#
# brew install ufraw imagick ffmpeg
# apt-get install ufraw imagick ffmpeg
# Convert to JPG's
for img in *.CR2; do convert -resize 1920 "$img" "$img.jpg"; print "$img"; done
# Make a video
#!/bin/bash
OLDIFS=$IFS
export IFS=$'\n'
# Find all boxes which have updates
AVAILABLE_UPDATES=$(vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2 2>/dev/null)
if [[ ${#AVAILABLE_UPDATES[@]} -ne 0 ]]; then
@Brainiarc7
Brainiarc7 / ssdp-behind-macvtap-kvm-libvirtd.md
Created February 15, 2017 15:30
This gist describes how to fix SSDP service discovery issues on DLNA servers hosted on KVM and Libvirt behind a bridged connection

Enable DLNA service discovery for media servers running on KVM hosts with bridged networking:

If you’re running a DLNA - capable Media Server (Such as Plex or Mediatomb) in a guest domain on a KVM/QEMU/libvirt-based hypervisor platform, make sure that the bridge you use to provide network access to the guest domain (such as macvtap) is configured in the host OS such that the allmulti flag is enabled. Assuming your bridge is macvtap0, you would sign into the host and go about setting the appropriate flag as follows:

$ sudo ip link set dev macvtap0 allmulticast on

Without this configuration, not all multicast packets required for DLNA (particularly client discovery operations) will be sent over the bridge to the guest domain, resulting in the media server failing to operate as required (because SSDP is not very forgiving).

@AgentOak
AgentOak / youtube_formats.md
Last active June 26, 2024 13:52
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@myfreeer
myfreeer / cycle-denoise.lua
Last active May 2, 2024 06:49
mpv user-script to cycle between lavfi's denoise filters, tested over mpv 0.25.0-58-g99cef59fc
-- settings
-- key_binding: press the key specified below
-- to cycle between denoise filters below,
-- set it to nil to disable the binding
local key_binding = "n"
-- key_binding_reverse cycle between denoise filters below
-- in reverse order, set it to nil to disable the binding,
-- set it to a single-char string to enable
local key_binding_reverse = nil
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active June 20, 2024 11:54
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE