Skip to content

Instantly share code, notes, and snippets.

View niklas-r's full-sized avatar
:shipit:
Shipping code, all day, `err` day

Niklas Kahn niklas-r

:shipit:
Shipping code, all day, `err` day
View GitHub Profile
@astuyve
astuyve / deny_snippet.json
Created January 17, 2024 15:00
Deny cloudwatch permissions from Lambda to save money
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
@bubba-h57
bubba-h57 / instructions.md
Last active April 20, 2025 21:08
Configuring Jetbrains Gateway and WSL

Step 1: SSH Daemon

In your WSL instance, re-install OpenSSH server as follows.

sudo apt remove --purge openssh-server
sudo apt install openssh-server

Edit /etc/ssh/sshd_config (e.g. sudo vi /etc/ssh/sshd_config) and add the following lines to the bottom of the file. Ensure you replace WSL_ACCOUNT_NAME with your WSL2 account name.

@kepano
kepano / obsidian-web-clipper.js
Last active March 3, 2026 23:21
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@Ryanb58
Ryanb58 / install.md
Last active December 31, 2025 20:22
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@vcarl
vcarl / userTimingMiddleware.js
Last active February 8, 2024 05:05 — forked from clarkbw/redux-performance-mark.js
A User Timing middleware for redux to create performance markers for dispatched actions
const userTiming = () => (next) => (action) => {
if (performance.mark === undefined) return next(action);
performance.mark(`${action.type}_start`);
const result = next(action);
performance.mark(`${action.type}_end`);
performance.measure(
`${action.type}`,
`${action.type}_start`,
`${action.type}_end`,
);
@dignite
dignite / TheLeadDeveloperLondon2018.md
Last active July 3, 2018 20:26
The Lead Developer London 2018

The Lead Developer London 2018

Videos will most likely be found sooner or later on White October Events Youtube.

The conference was inspiring and brought up a few tricks here and there. Mostly talks about leadership with a few more or less relevant technical talks sprinkled in. A good reminder on all the techniques and perspectives that I have heard before but not structured as neatly and condensed.

The Lead Developer London 2018, Day 1

The Container Operator’s Manual

@eugenet8k
eugenet8k / Readme.md
Last active March 18, 2025 00:32
Support NVM in Fish Shell
@bo-chen
bo-chen / keybindings.lua
Created March 4, 2017 08:09
hammerspoon tap/hold capability
local application = require "hs.application"
local eventtap = require "hs.eventtap"
local keycodes = require "hs.keycodes"
local hotkey = require "hs.hotkey"
local log = hs.logger.new("init", "debug")
local keyDown = eventtap.event.types.keyDown
local keyUp = eventtap.event.types.keyUp
local flagsChanged = eventtap.event.types.flagsChanged
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active February 23, 2026 08:56
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@tanyuan
tanyuan / smart-caps-lock.md
Last active March 1, 2026 09:25
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.