Skip to content

Instantly share code, notes, and snippets.

View DragoonAethis's full-sized avatar

Dragoon Aethis DragoonAethis

View GitHub Profile
@DragoonAethis
DragoonAethis / Open Folder in ST3
Created December 29, 2013 19:44
And magically, the whole world is happier.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\sublime]
@="Open in &Sublime"
"Icon"="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\sublime]
@DragoonAethis
DragoonAethis / AKO-UTF8-UTF16-Tester.c
Last active October 15, 2017 20:29
A lightweight tester to check if your UTF-8 -> UTF-16 conversion function works correctly. Further test cases can be added in the test_battery().
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
// How many tests passed?
int tests = 0;
int passed = 0;
struct test_case {

Windows 10 (19H1) Privacy-friendly GPO Settings

This guide lists most GPO settings to make Windows 10 a bit saner. It tries to strike a balance between privacy and usability, without compromising too much on both. It's what most users would work fine with.

While installing Windows, disconnect from the Internet and configure most of these policies offline. Do NOT use a Microsoft account.

Press Ctrl-R, run gpedit.msc and using the tree on the left navigate to certain subtrees. Configure the policies as needed. If something is not mentioned, it should be left as "Not configured", but you're free to configure anything interesting you see as you wish.

These settings assume you have Windows 10 Enterprise but have not joined any Active Directory (AD) domain. Many of these settings will not work on Home or Pro editions. Some optional, nice to have options are also mentioned below - while not contributing to privacy, they might generally be desired.

@DragoonAethis
DragoonAethis / FilteringTest.csproj
Created August 7, 2019 20:02
Serilog Property Filtering Test
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog" Version="2.8.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
</ItemGroup>
@DragoonAethis
DragoonAethis / PKGBUILD
Last active May 21, 2020 15:17
mikintcpio-scboot: unlock a LUKS volume using a key stored on a smart card
pkgname=mkinitcpio-scboot
pkgver=1.0.0
pkgrel=1
pkgdesc="Boot from an encrypted partition using a key stored on a smart card."
author=('Dragoon Aethis <dragoon@dragonic.eu>')
license=('MIT')
arch=('any')
source=('scboot-hooks.sh' 'scboot-install')
sha256sums=('SKIP' 'SKIP')
depends=('opensc' 'libusb' 'libusb-compat' 'pcsclite' 'ccid' 'acsccid' 'mkinitcpio')
@DragoonAethis
DragoonAethis / eNauczanieLite.css
Last active October 2, 2020 11:28
eNauczanie Lite - Użyj Stylisha aby zaimportować (Manage -> Write New Style -> Mozilla Format -> Import)
@-moz-document domain("enauczanie.pg.edu.pl") {
#slideshow,
.top-header-branding,
.page-header-image > a:nth-child(1) > img:nth-child(1),
.course-info-container > div > .media > .media-left,
.block_recentlyaccessedcourses,
.block_recentlyaccessedcourses + span#sb-5 {
display: none;
}
@DragoonAethis
DragoonAethis / millextract.py
Created May 28, 2022 20:42
Skrypt do eksportu historii zwykłego (nie-biznesowego) konta Millennium do CSV
"""
Skrypt do eksportu historii zwykłego konta Millennium do CSV
Wymaga Pythona 3 i Pandas (pip install pandas)
Jak używać:
1. Na stronie Millennium otwórz historię konta
2. Kliknij Wyszukiwanie zaawansowane
3. Otwórz devtoolsy w przeglądarce (F12) -> Sieć/Network
(To powinno zacząć zapisywanie requestów do Millennium)
@DragoonAethis
DragoonAethis / bookmarklet.js
Created June 26, 2022 16:06
On YouTube, open the transcription panel and run this bookmarklet to copy the transcription to your clipboard without timestamps.
javascript: (() => {
const fragments = [];
const elems = document.getElementsByClassName("ytd-transcript-segment-renderer");
if (elems.length === 0) {
alert("No transcript elements found - are you sure the transcription panel is open?");
return;
}
for (const elem of elems) {
/* Want timestamps? Remove .slice(1) here: */
@DragoonAethis
DragoonAethis / wordlist_merged_en_pl.txt
Last active February 7, 2023 18:37
Merged PL/EN common password wordlist
# Merged Polish/English common password wordlist, sources:
# - https://gist.github.com/roycewilliams/226886fd01572964e1431ac8afc999ce
# - https://cert.pl/hasla/
# ~8k EN, ~4k PL passwords.
# Sorted alphabetically, converted to lowercase.
# Removed all <8 chars, numeric-only and uncracked passwords.
# Useful for common password checks in combination with other basic checks.
# Thanks to @baatochan for prodding me with the PL list.
!qaz1qaz
!qaz2wsx
@DragoonAethis
DragoonAethis / PKGBUILD
Created May 2, 2023 13:06
nautilus-typeahead 44.1-1
# $Id: PKGBUILD 278826 2016-10-15 00:15:40Z heftig $
# Contributor (original patch code): Jan de Groot <jgc@archlinux.org>
# Contributor (original package maintainer): Ian Hernández <badwolfie@archlinux.info>
# Contributor (current main repo package maintainer): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor (current patch code): Xavier Claessens <xavier.claessens@collabora.com>
# Contributor (fix for backspace going to parent folder): Jeremy Bicha <jbicha@debian.org>
# Contributor (updated patch for 43.2): Bryan Lai <bryanlais@gmail.com>
# Maintainer: Albert Vaca Cintora <albertvaka@gmail.com>
pkgbase=nautilus-typeahead