Skip to content

Instantly share code, notes, and snippets.

@d4v3y0rk
d4v3y0rk / howto.md
Created March 14, 2020 13:04
Encryption with DM_CRYPT in WSL2

Encrypted Volumes in WSL2

Description

This is a quick guide on how to setup dm_crypt under WSL2 for working with encrypted volumes. I use an encrypted volume to store things like password recovery codes and 2nd factor backup codes etc. I recently switched over to using WSL2 and wanted to figure out how to enable this functionality there. This is the distilled howto for getting it to work.

Guide

First thing you have to do is create a custom WSL2 kernel. Inside your already installed and running WSL2 (ubuntu) installation:

  • Install some required packages.
@satori99
satori99 / app.js
Last active April 17, 2024 09:36
This is a proof-of-concept for using ffmpeg as a HTTP video stream proxy that can reduce the volume of ad-breaks
/**
* This is a proof-of-concept for using ffmpeg as a HTTP video stream proxy
* that can reduce ad volume.
*
* It only works on streams containing SCTE35 data packets.
* You can check a stream using:
*
* ffmpeg -hide_banner -i <SOURCE_URL> 2>&1 | grep scte_35
*
* Start the demo:
@seraku24
seraku24 / 149909-playlist_youtube-vlc3patch.lua
Created May 16, 2018 09:56
VLC 3.x compatibility patch for 149909-playlist_youtube.lua
--[[
Youtube playlist importer for VLC media player 1.1 and 2.0
Copyright 2012 Guillaume Le Maout
Authors: Guillaume Le Maout
Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@tung
tung / twitch-vod-chat.py
Last active March 10, 2023 10:34
Download chat from a Twitch VOD and print it to a terminal.
#!/usr/bin/env python3
#
# A script to download chat from a Twitch VOD and print it to a terminal.
# Chat will be downloaded all the way until it ends.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod-chat.py [video_id] [start]
#
# This script could break at any time, because Twitch's chat API is
# undocumented and likes to change at any time; in fact, this script was
@tung
tung / twitch-vod.py
Last active February 27, 2023 02:33
Play Twitch VODs in mpv with chat replay in terminal
#!/usr/bin/env python3
#
# Twitch VOD viewer with terminal chat replay.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod.py https://www.twitch.tv/videos/1234567890 [360p]
#
# Requires mpv and twitch-vod-chat.py - https://gist.github.com/tung/20de3e992ca3a6629843e8169dc0398e
#
@kmark
kmark / extractMotionPhotos.sh
Last active November 3, 2020 14:38
Samsung Galaxy Motion Photo extraction tool
#!/bin/bash
# Copyright 2017 Kevin Mark
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
@ljharb
ljharb / array_iteration_thoughts.md
Last active March 20, 2024 13:40
Array iteration methods summarized

Array Iteration

https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu

@binary1230
binary1230 / wells fargo website bulk statement downloader
Last active November 14, 2023 02:22
wells fargo ability to download all bank statements
3/18/2021: WE HAVE MOVED: For the latest instructions on how to use the bulk wells fargo PDF downloader,
please ignore this page and visit below:
https://github.com/binary1230/wellsfargo-bulk-PDF-statement-downloader/blob/main/README.md
@ruario
ruario / intro-latest-widevine.md
Last active January 29, 2024 07:53
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.

If you are using something newer than Vivaldi 2.2, you should not be using this script as there is simply no need. Any need you think you have for it would be a bug IMHO and thus should be logged in a bug report. Before you do so however, you should also checkout the Vivaldi help page on Widevine, on Linux


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a b

@kmonsoor
kmonsoor / RPi-install-wifi.sh
Last active February 19, 2024 05:46
install wifi adapter drivers on Raspberry Pi; origin: http://www.fars-robotics.net/install-wifi
#!/bin/bash
#set -e
# origin-source: http://www.fars-robotics.net/install-wifi
# install-wifi - v9.4 - by MrEngman.
# After downloading this script:
# $ sudo mv ./install-wifi /usr/bin/install-wifi
# $ sudo chmod +x /usr/bin/install-wifi
# $ sudo install-wifi -h
#