Skip to content

Instantly share code, notes, and snippets.

View pascalrogalla's full-sized avatar
🦊
Ring-ding-ding-ding-dingeringeding!

Pascal Rogalla pascalrogalla

🦊
Ring-ding-ding-ding-dingeringeding!
View GitHub Profile
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@senko
senko / onchange.sh
Last active April 1, 2025 17:30
OnChange - Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@maephisto
maephisto / Javascript ISO country code to country name conversion
Last active August 15, 2024 03:08
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@m3g4p0p
m3g4p0p / watch-your-back.js
Last active April 4, 2024 17:11
Capture a video stream and play it with some delay
const DELAY = 2000
const videos = []
const hide = el => el.style.display = 'none'
const show = el => el.style.display = 'block'
const showAndHideOthers = ({ target }) => {
window.requestAnimationFrame(() => {
videos.forEach(hide)
show(target)
@dominikwilkowski
dominikwilkowski / Readme.md
Last active July 27, 2025 19:57
How to install a man page into a node.js app

How to install a man page into a node.js app

Cuttlebelle man page

Installing a man page is not easy as there are little infos out there about it.

After a lot of trial and error, google searches and alpha publishing my app I finally have a collection of things I need to do to get it working:

@masterzen
masterzen / keymap.c
Created September 23, 2018 14:12
QMK keymap to change rgb underglow based on Caps Lock
extern rgblight_config_t rgblight_config;
uint32_t mode;
uint16_t hue;
uint8_t sat;
uint8_t val;
void matrix_init_user(void)
{
@fdidron
fdidron / ABOUT.md
Last active April 9, 2024 23:53
Ergodox-EZ Glow per layer / per key illumination

rules.mk

Contains all the directives required to activate QMK's rgb matrix features.

config.h

Sets a constant required to read the rgb matrix config from the EEPROM.

keymap.c

Custom keymap based on my layout. This is where the magic happens.

First let's declare a rgb_matrix_config variable of type rgb_config_t :

export default function useMicroMemo() {
const memosRef = React.useRef(new Map());
return (id, updater, deps) => {
const memo = memosRef.current.get(id) || {};
let shouldUpdate;
if (!memo.deps) {
shouldUpdate = true;
} else if (deps.length !== memo.deps.length) {
@silver-xu
silver-xu / ts-boilerplate.md
Last active August 16, 2025 22:44
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@MBing
MBing / install_wlan_dongle.sh
Last active September 2, 2025 14:59
install TP-Link-WN725N Nano USB Wifi on Raspberry Pi with Kernel 5.10+
# DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW
# Brief note, after this the UI will not show the usb dongle,
# the wifi does work and I get an IP address, so all works,
# but I don't go into detail of making it show on the Raspbian UI.
# (for this purpose I don't care about the UI)
# For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into.
## STEP 1: Prepare machine and install packages needed