Skip to content

Instantly share code, notes, and snippets.

View mrjohannchang's full-sized avatar

Johann Chang mrjohannchang

View GitHub Profile
@numToStr
numToStr / au.lua
Last active August 20, 2023 05:15
Neovim autocmd in lua
--
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua
--
local cmd = vim.api.nvim_command
local function autocmd(this, event, spec)
local is_table = type(spec) == 'table'
local pattern = is_table and spec[1] or '*'
local action = is_table and spec[2] or spec
if type(action) == 'function' then
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Created June 18, 2021 03:56 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@fabianoriccardi
fabianoriccardi / Comparison Espressif ESP MCUs.md
Last active May 11, 2024 09:03
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@ruandre
ruandre / win10-11.md
Last active March 30, 2024 09:54
After installing Windows 10/11

🪟 After installing Windows 10/11

Install

You can use https://uupdump.net/ to build up an ISO file (even from Linux or Mac, the options enable you to keep the file size down) and just drop into https://github.com/ventoy/Ventoy and you're good to go.

If you're already running Windows you can do ⊞ Win, Reset this PC for a more convenient ISO download option.

For keys try https://www.microsoft.com/windows/get-windows-11 or local retail store, otherwise check PC Hardware channels on YouTube as they often have links to discounted keys (obviously check if valid/legit, due diligence, etc.)

@fevangelou
fevangelou / Software RAID 1 setup on Ubuntu Server 20.04.md
Last active March 1, 2024 01:02
Software RAID 1 setup on Ubuntu Server 20.04 (or newer)

Looking to create a Software RAID 1 setup for your 2-disk server on Ubuntu Server 20.04?

Screen Shot 2020-06-05 at 20 55 31

Let's start with the basics: the official guide by Ubuntu (https://ubuntu.com/server/docs/install/storage) is outdated/wrong. And as of March 2021 it's possible that there's a bug as well with how the bios_grub partitions are created when using multiple disks.

Now on to the solution:

  • Select "Custom storage layout" when you reach the storage configuration step of the installer.
  • If the disks have existing partitions, click on each disk under AVAILABLE DEVICES and then select REFORMAT. This will (temporarily) wipe out the partitions.
@jloow
jloow / papercolor.json
Created January 25, 2020 19:01
PaperColor theme for Windows Terminal
// Theme based on https://github.com/NLKNguyen/papercolor-theme
// Add the following under "schemes" in "profiles.json"
{
"name": "PaperColor",
"foreground": "#444444",
"background": "#eeeeee",
"black": "#1c1c1c",
"red": "#af0000",
"green": "#008700",
"yellow":"#d75f00",
@fworks
fworks / install-zsh-windows-git-bash.md
Last active May 10, 2024 15:46
Zsh / Oh-my-zsh on Windows Git Bash
@gmag11
gmag11 / mqtt_ssl_idf.ino
Last active February 26, 2024 10:13
Secure MQTT connection to broker with ESP32 and internal IDF mqtt client library
#include "Arduino.h"
#include <WiFi.h>
#include "esp_log.h"
#include "esp_system.h"
#include "esp_event.h"
#include "mqtt_client.h"
#define SECURE_MQTT // Comment this line if you are not using MQTT over SSL
#ifdef SECURE_MQTT
@jborean93
jborean93 / ServiceRecovery.ps1
Last active February 28, 2024 03:27
Get and Set the Windows service recovery options
# Copyright: (c) 2018, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Add-Type -TypeDefinition @'
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections.Generic;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
@rgl
rgl / python-embedded.md
Last active March 18, 2024 15:33
notes about python embedded in windows

The gist is:

  1. install the normal python from python.org
  2. install everything into a venv
  3. copy the venv into python embed.

A raw example

unzip python-3.8.0-embed-amd64.zip