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
@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"
@joseluisq
joseluisq / stash_dropped.md
Last active July 16, 2024 11:38
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.

@seanhandley
seanhandley / docker-compose.yml
Last active June 7, 2024 19:25
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:
@jefftenney
jefftenney / lptimTick.c
Last active May 21, 2023 17:02
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)
@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()