Skip to content

Instantly share code, notes, and snippets.

View huming2207's full-sized avatar
πŸ’­
I may be slow to respond.

Jackson Hu huming2207

πŸ’­
I may be slow to respond.
  • SmartGuide Pty Ltd.
  • Melbourne, VIC, Australia
  • 03:01 (UTC +10:00)
  • X @huming2207
View GitHub Profile
@eduardoflorence
eduardoflorence / main.dart
Created March 23, 2021 19:12
GetX - Sample BottomNavigationBar
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
debugShowCheckedModeBanner: false,
initialRoute: '/home',
defaultTransition: Transition.fade,
getPages: [
GetPage(
@harveyconnor
harveyconnor / README.md
Created May 26, 2020 01:13
React Native Swift Module Singleton Pattern with Events Example

React Native Swift Module Singleton Pattern

If you are reading this tutorial please be aware that this is for advanced users that require a singleton pattern in their RN native module and some documentation detail is left out intentionally.

For the sake of this tutorial we will be using TestManager as our class.

Instructions

  1. First of all you need to setup a swift class with a bridging header, in Xcode it will generate this for you upon creating a Swift file.
  2. Create your swift class with the @objc directive.
  3. Create a second class that has a static export of the class in singleton.
  4. Follow the files below for a boilerplat example.
@igrr
igrr / esp32s2beta_dedicated_gpio_example_main.c
Created January 13, 2020 05:06
ESP32-S2 (beta) dedicated GPIO example
/* ESP32-S2 (beta) "dedicated GPIO" peripheral example */
#include <stdio.h>
#include "sdkconfig.h"
#include "soc/system_reg.h"
#include "esp32s2beta/rom/gpio.h"
#include "soc/gpio_sig_map.h"
#include "driver/gpio.h"
/* The header file is not yet in IDF; however this is the only register we need. */
@harveyconnor
harveyconnor / a-mongodb-replica-set-docker-compose-readme.md
Last active April 29, 2025 21:20
MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume

This will guide you through setting up a replica set in a docker environment using.

  • Docker Compose
  • MongoDB Replica Sets
  • Mongoose
  • Mongoose Transactions

Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!

@darkarnium
darkarnium / FT2232HSWD.py
Last active April 18, 2020 01:28
Provides a very basic FT2232H SWD implementation
''' Provides a very basic (read: shitty) FT2232H SWD implementation. '''
import time
import logging
import binascii
from struct import pack
from struct import unpack
from operator import xor
from pyftdi.gpio import GpioController
@rluvaton
rluvaton / mongo-error-code.ts
Last active October 23, 2023 06:41
Mongo Error Code #mongo #ts
export enum MongoErrorCode {
OK = 0,
InternalError = 1,
BadValue = 2,
OBSOLETE_DuplicateKey = 3,
NoSuchKey = 4,
GraphContainsCycle = 5,
HostUnreachable = 6,// Categories: NetworkError, RetriableError
HostNotFound = 7,// Categories: NetworkError, RetriableError
UnknownError = 8,
@jfredrickson
jfredrickson / disable_c6.md
Last active August 23, 2023 17:36
Disable AMD Ryzen C6 state to prevent system freezes
@JMishou
JMishou / AsyncWebUpdate.ino
Created December 30, 2017 05:11
ESPAsyncWebServer webupdate
/*
__/\\\\____________/\\\\__/\\\\\\\\\\\_____/\\\\\\\\\\\____/\\\________/\\\_
_\/\\\\\\________/\\\\\\_\/////\\\///____/\\\/////////\\\_\/\\\_______\/\\\_
_\/\\\//\\\____/\\\//\\\_____\/\\\______\//\\\______\///__\/\\\_______\/\\\_
_\/\\\\///\\\/\\\/_\/\\\_____\/\\\_______\////\\\_________\/\\\\\\\\\\\\\\\_
_\/\\\__\///\\\/___\/\\\_____\/\\\__________\////\\\______\/\\\/////////\\\_
_\/\\\____\///_____\/\\\_____\/\\\_____________\////\\\___\/\\\_______\/\\\_
_\/\\\_____________\/\\\_____\/\\\______/\\\______\//\\\__\/\\\_______\/\\\_
_\/\\\_____________\/\\\__/\\\\\\\\\\\_\///\\\\\\\\\\\/___\/\\\_______\/\\\_
_\///______________\///__\///////////____\///////////_____\///________\///__
@bjornvaktaren
bjornvaktaren / minimal_spi.cpp
Last active March 26, 2025 00:52
Simple SPI example with libftdi and FTDI UM232H
// Quite minimal example showing how to configure MPSSE for SPI using libftdi
// compile like this: g++ minimal_spi.cpp -o minimal_spi -lftdipp -lftdi
#include <ftdi.hpp>
#include <usb.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
// UM232H development module
#define VENDOR 0x0403
@AlexBAV
AlexBAV / guid.h
Last active August 10, 2024 06:24
Constexpr GUID parsing (parsing string GUIDs at compile-time)
//-------------------------------------------------------------------------------------------------------
// constexpr GUID parsing
// Written by Alexander Bessonov
//
// Licensed under the MIT license.
//-------------------------------------------------------------------------------------------------------
#pragma once
#include <stdexcept>
#include <string>