Skip to content

Instantly share code, notes, and snippets.

View Jaakkonen's full-sized avatar

Jaakko Sirén Jaakkonen

  • Helsinki, Finland
View GitHub Profile
@khalidx
khalidx / node-typescript-esm.md
Last active October 18, 2025 09:49
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@andrebrait
andrebrait / keychron_linux.md
Last active December 12, 2025 22:22
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@danderson
danderson / securify-boot.sh
Created February 4, 2020 07:46
Arch secure boot hacky script
#!/bin/bash
set -e
# Temporary directory for assembling the unified kernel image.
WORKDIR=$(mktemp -d)
trap "rm -rf ${WORKDIR}" EXIT
# Two directories on the EFI partition: Arch for the bootloaders, and
# Linux for the unified kernel images.
@gsurrel
gsurrel / Galaxy_S8_Debloat.sh
Last active September 30, 2025 09:34
Samsung Galaxy S8 debloat list
###########################
# Phone apps and services #
###########################
adb shell "cmd package install-existing com.android.stk" # SIM toolkit
adb shell "cmd package install-existing com.android.stk2" # SIM toolkit (maybe for dual-sim devices)
adb shell "cmd package install-existing com.sec.android.app.simsettingmgr" # SIM card manager, maybe required, contains configuration and settings for handling dual SIM (give a SIM an icon, a name, and so on)
adb shell "pm uninstall -k --user 0 com.samsung.android.smartcallprovider" # The 4th tab in the Phone app for 'local places'
adb shell "pm uninstall -k --user 0 com.sec.vsim.ericssonnsds.webapp" # NSDSWebApp. The Non Sim Device Solution (NSDS) is linked to VoLTE and VoWifi (Wifi Calling). NSDS allows connecting non sim devices to IMS core: https://uk.linkedin.com/in/hemant-kumar-dewnarain-2b779679
adb shell "pm uninstall -k --user 0 com.android.cts.ctsshim" # Part of the Android Compatibility Test Suite: https://source.android.com/compatibility/cts/setu
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -741,7 +741,6 @@ out:
}
tablet_history_push(tablet, &tablet->axes);
- tablet_smoothen_axes(tablet, &axes);
/* The delta relies on the last *smooth* point, so we do it last */
axes.delta = tablet_tool_process_delta(tablet, tool, device, &axes, time);
@dodying
dodying / chromium-command-line-switches.md
Last active November 2, 2025 20:58
[List of Chromium Command Line Switches] https://peter.sh/experiments/chromium-command-line-switches/ #chrome #lookup

There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last automated update occurred on 2018-10-20.

Condition Explanation
-- Report pseudo allocation traces. Pseudo traces are derived from currently active trace events.
--/prefetch:1 /prefetch:# arguments to use when launching various process types. It has been observed that when file reads are consistent for 3 process launches with the same /prefetch:# argument, the Windows prefetcher starts issuing reads in batch at process launch. Because reads depend on the process type, the prefetcher wouldn't be able to observe consistent reads if no /prefetch:# arguments were used. Note that the browser process has no /prefetch:# argument; as such a
@CMCDragonkai
CMCDragonkai / problems_with_intel_wireless_7265D.md
Last active August 5, 2021 14:13
Problems with Intel Wireless 7265D #hardware

Problems with Intel Wireless 7265D

This card is Intel Wireless 7265D, you can find out by searching through demsg and looking for:

Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210

This card is limited to 2.4 Ghz AP mode, while supporting 5 Ghz client mode. Yet 5 Ghz is certainly possible, something is preventing the card from being able to emit at 5 Ghz.

@jarvisnn
jarvisnn / matrix-multiplication.cu
Created October 1, 2016 12:42
Matrix Multiplication code on GPU with CUDA
/**
*
* Matrix Multiplication - CUDA for GPUs
*
* NUS CS3210 - Jarvis
*
**/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@olih
olih / jq-cheetsheet.md
Last active December 5, 2025 21:17
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq