Skip to content

Instantly share code, notes, and snippets.

View JcBernack's full-sized avatar
:shipit:
The same thing we do every night, Pinky.

Jan Christoph Bernack JcBernack

:shipit:
The same thing we do every night, Pinky.
View GitHub Profile
@andrewmackrodt
andrewmackrodt / hidpi-switch.ts
Last active April 7, 2022 04:07
Toggles fractional scaling between 100% and 125%
#!./node_modules/.bin/ts-node-dev
/**
* Based on https://askubuntu.com/a/1267328/170380
*/
import { exec } from 'child_process'
import dbus from 'dbus-next'
const sessionBus = dbus.sessionBus()
@jefftenney
jefftenney / lptimTick.c
Last active September 21, 2024 18:58
No-Drift FreeRTOS tick/tickless for STM32 via LPTIM
// lptimTick.c -- Jeff Tenney
//
// STM32 No-Drift FreeRTOS Tick/Tickless via LPTIM
//
// Example integration and validation: https://github.com/jefftenney/LPTIM-Tick
//
// Revision: 2021.11.23
// Tabs: None
// Columns: 110
// Compiler: gcc (GNU) / armcc (Arm-Keil) / iccarm (IAR)
@seanhandley
seanhandley / docker-compose.yml
Last active October 22, 2024 06:00
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@joseluisq
joseluisq / stash_dropped.md
Last active August 5, 2024 08:36
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@heiko-r
heiko-r / ble_config.c
Created October 26, 2017 12:39
ESP32 BLE GATT server example
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "esp_system.h"
#include "esp_log.h"
#include "bt.h"
#include "bta_api.h"
#include "esp_gap_ble_api.h"
#include "esp_bt_main.h"