Skip to content

Instantly share code, notes, and snippets.

@0x4a
0x4a / joey_bleepbloop-cart.txt
Created April 29, 2023 06:15
Joey X commands to flash a bleepbloop flashcart
delete: FCE1
mode: !MCV5PWZ1W09E99**
@0x4a
0x4a / errorpage.html
Created August 30, 2022 23:20
simple 404 error page
<!DOCTYPE html>
<html lang="de" >
<head>
<meta charset="UTF-8">
<title>404 NOT FOUND</title>
<link rel="stylesheet" href="style.css">
<style>
@import url(https://fonts.googleapis.com/css?family=Asap&display=swap);
html, body {
<?php
$order = $_GET['order'];
if (isset($order)) {
$fp = fopen('pageviews.csv', 'a');
fwrite($fp, $order . "\n");
fclose($fp);
echo "registered order: " . $order;
}
?>
@0x4a
0x4a / exchange_quota.ps1
Last active March 23, 2021 18:19
Get remaining quota on #outlook #exchange #mailbox
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline
Get-MailboxFolderStatistics user@host.tld -FolderScope sentItems | FL Name,FolderAndSubfolderSize,ItemsInFolderAndSubfolders
#NoEnv
#SingleInstance, Force
Menu,Tray,Icon, %A_WinDir%\system32\shell32.dll,174
; special characters on us-keyboard
kbdLayout := DllCall("GetKeyboardLayout", Int,DllCall("GetWindowThreadProcessId", int,WinActive("A"), Int,0)) >> 16
if (kbdLayout == 1033)
>!a::SendInput ä

QMK setup on Windows 10 using WSL 2

To run QMK under Windows using the Windows Subsystem for Linux with Fish-Shell, follow these steps:

  • do a sudo apt install git python3 python3-pip
  • add to path via set -Ua fish_user_paths $HOME/.local/bin
  • install qmk: python3 -m pip install --user qmk
  • clone repository from windows and to windows filesystem: git clone https://github.com/0x4a/qmk_firmware.git
  • there will be some packages missing, so do: sudo apt install gcc-avr avrdude gcc-arm-none-eabi dfu-util
  • the dfu-programmer won't work because USB support is missing in WSL, so I just symlinked dfu-util to dfu-programmer with sudo ln -s /usr/bin/dfu-util /usr/bin/dfu-programmer. Yes, that will not work how it is intended, but it satisfies qmk's check for dfu-programmer. As we will never use it, and flash via mdloader instead, that should not be a problem. Just remember to not use dfu-programmer or try to flash the board from WSL. As an
@0x4a
0x4a / nextcloud_directAlbums.js
Last active July 20, 2020 21:29
#userscript to show album-view directly instead of photos in #nextcloud
// ==UserScript==
// @name nextcloud_directAlbums
// @namespace 0x4a.net
// @version 0.1.0
// @description show album view directly instead of photos (which does not adhere to .nomedia files)
// @author Daniel Jackel
// @license MIT
// @include https://your.nextcloud.tld/index.php/apps/photos/*
// @icon https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon.png
// @downloadURL https://gist.github.com/0x4a/3b8228d2b5a74c4b51ab450630cae4cb
@0x4a
0x4a / facebook_deleteComments.js
Created July 17, 2020 21:50
#userscript for #facebook to delete comments in bulk
// ==UserScript==
// @name facebook_deleteComments
// @namespace 0x4a.net
// @version 0.1.0
// @description lets see what we can do
// @author Daniel Jackel
// @copyright 2020, Daniel Jackel (dev@0x4a.net)
// @license MIT
// @include https://www.facebook.com/*/allactivity
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
@0x4a
0x4a / pinboard_fixBookmarks.js
Last active February 28, 2020 06:31
#userscript for #pinboard to edit links in external window. Good to fix bookmarks with broken encoding in description, that brake site-js
// ==UserScript==
// @name pinboard_fixBookmarks
// @namespace 0x4a.net
// @version 0.4.14
// @description Add an edit button to edit links from pinboard.in in a popup. Filter bookmarks for broken encoding (breaks page function) or youtube-links. Get missing titles for youtube via JSON.
// @author Daniel Jackel
// @copyright 2020, Daniel Jackel (dev@0x4a.net)
// @license MIT
// @include https://pinboard.in/u:*
// @include https://pinboard.in/add*
// Original author fwed (contact@fwed.fr)
// Modified from
// https://gist.github.com/anonymous/2cca33d376f7f924fdaa67891ad098cc
// https://medium.com/@fw3d/auto-archive-emails-in-gmail-after-2-days-1ebf0e076b1c
function gmailAutocleanup() {
var delete_after = "3d";
var archive_after = "1m";
// ifttt Weather