Skip to content

Instantly share code, notes, and snippets.

View Rainyan's full-sized avatar
I may be slow to respond.

Rain Rainyan

I may be slow to respond.
  • Finland
  • 18:20 (UTC +03:00)
View GitHub Profile
jix / resolve_tco_links.user.js
Last active August 24, 2023 10:58
User script to resolve links on twitter
dmsul /
Last active July 7, 2024 23:28
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.


Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

#!/usr/bin/env python
# Linux usage: ./ "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>"
# i.e.: ./ "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
# Mac usage: ./ "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/"
# i.e.: ./ "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/"
import leveldb
import sys
import re
Vestride /
Last active June 5, 2024 14:38
Encoding video for the web

Encoding Video


Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
rannmann / SteamUserFunctions.php
Last active August 31, 2023 15:03
Convert Steam IDs to and from Community IDs and User IDs
/* Examples
toSteamID(25490879) // STEAM_0:1:12745439
toSteamID(76561197985756607) // STEAM_0:1:12745439
toSteamID("STEAM_0:1:12745439") // STEAM_0:1:12745439
toUserID(25490879) // 25490879
toUserID(76561197985756607) // 25490879
toUserID("STEAM_0:1:12745439") // 25490879
kevinsqi / Hanazawa Kana - Recover Decoration (Nisekoi ED2) guitar chords.txt
Last active August 22, 2018 23:52
Hanazawa Kana - Recover Decoration (Nisekoi ED2) guitar chords
Hanazawa Kana - Recover Decoration (Nisekoi ED2)
Guitar chords by Kevin Qi -
Guitar cover video -
Abmin7 | Bbmin7 | Abmin7 | Bbmin7 |
Abmin7 | Bbmin7 | Cmin7b5 |
mkropat /
Last active July 1, 2024 19:21
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
sym3tri / JapaneseRegex.js
Created May 19, 2011 02:46
Regex to test for presence of Japanese characters
// 3000-303F : punctuation