Skip to content

Instantly share code, notes, and snippets.

@trapexit
trapexit / yt-dl
Created Aug 24, 2019
youtube-dl setup for archiving
View yt-dl
#!/bin/bash
if [ "${1}" == "-d" ]; then
ARCHIVE="--download-archive ${2}"
shift
shift
fi
youtube-dl \
${ARCHIVE} \
View youtube-dl.conf
# Lines starting with # are comments
--ignore-errors
# --socket-timeout SECONDS
--socket-timeout 60
--retries 8
--output "%(uploader)s/[%(playlist_id)s] %(playlist)s/%(playlist_index)s %(upload_date)s [%(id)s] - %(title)s.%(ext)s"
@dylan-k
dylan-k / .vale.ini
Last active May 12, 2020
Settings for the Vale prose linter
View .vale.ini
# Config file for Vale, A syntax-aware linter for prose
# Vale expects its configuration to be in a file named .vale.ini or _vale.ini.
# It'll look for this file next to the one you're linting
# Otherwise it looks in your home directory
# DOCS: https://errata-ai.github.io/vale/config/
# BACKUP: https://gist.github.com/dylan-k/0ce8440e8f1ab6accac287fbbf76435c
# Core settings
StylesPath = /Users/Dylan/.config/vale/styles
@paulmallon
paulmallon / Windows 10 post install script
Last active Nov 2, 2019
Post windows 10 install script to fix UI stuff and privacy settings.
View Windows 10 post install script
Windows 10 post install script
Please see post_install_part1.ps1 and post_install_part2.ps1 for details
Part 1 - Fix Privacy, Explorer, Logon and misc windows settings
----------------------------------------------------------------------------------------------------------
Disable-UAC
Disable-UpdateRestart
Disable-Autoplay
@thehig
thehig / screenshots.spec.js
Created Sep 19, 2018
js: Storyshots with multiple device/viewport puppeteer screenshots
View screenshots.spec.js
import path from 'path';
import fs from 'fs';
import initStoryshots from '@storybook/addon-storyshots';
import { imageSnapshot } from './storyshots-puppeteer';
import devices from 'puppeteer/DeviceDescriptors';
// Store the screenshots outside the source folder to prevent jest from 'watching' them.
// Since they're outside the src directory we nav to them relatively
const ROOTDIR = path.join(__dirname, '../../../');
@SeriouslyMoe
SeriouslyMoe / fb2k-scripts.md
Last active Mar 18, 2019
foobar2000 Scripts
View fb2k-scripts.md

Foobar2000 scripts

Personal scripts deviating from the defaults provided by foobar2000 out of the box. Curated for my own directory setup and tags, but feel free to use.

Window Title

Playing: Catch Us by Odyssey (feat. Mortimer)

Paused: Various Artists | foobar2000

@glasslion
glasslion / vtt2text.py
Last active Jun 20, 2020
This script convert youtube subtitle file(vtt) to plain text.
View vtt2text.py
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
View punto.ahk
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; This should be replaced by whatever your native language is. See
; http://msdn.microsoft.com/en-us/library/dd318693%28v=vs.85%29.aspx
; for the language identifiers list.
ru := DllCall("LoadKeyboardLayout", "Str", "00000419", "Int", 1)
@strayge
strayge / shortcuts.ahk
Last active Mar 18, 2018
windows shortcuts
View shortcuts.ahk
; # - win, ! - alt, ^ - ctrl, + - shift
#MaxHotkeysPerInterval 200
global en := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1)
ChangeActiveLayoutToEng()
{
WinGet, window_id, ID, A
pid := DllCall("GetWindowThreadProcessId", "UInt", window_id, "Ptr", 0)
@sidneys
sidneys / youtube-classic.sort-rearrange-organize-playlists.js
Last active Feb 10, 2020
Greasemonkey | YouTube | Advanced Playlist Sorting
View youtube-classic.sort-rearrange-organize-playlists.js
// ==UserScript==
// @name YouTube (Classic) | Sort, Rearrange & Organize Playlists
// @namespace de.sidneys.userscripts
// @homepage https://gist.githubusercontent.com/sidneys/27e704ec4a1d9bad311d634cbab2f218/raw/
// @version 29.0.0
// @description Organize and rearrange your YouTube playlists. Real server-side sorting by duration, title, channel and language.
// @author sidneys
// @icon https://www.youtube.com/favicon.ico
// @noframes
// @include http*://www.youtube.com/*
You can’t perform that action at this time.