Skip to content

Instantly share code, notes, and snippets.

View anguschiu1's full-sized avatar

Angus Chiu anguschiu1

View GitHub Profile
Sensirion SCD30
https://www.mouser.co.uk/ProductDetail/Sensirion/SCD30?qs=rrS6PyfT74fdywu4FxpYjQ%3D%3D
Raspberry Pi Pico (U1)
https://www.raspberrypi.org/products/raspberry-pi-pico/
0.96 OLED SSD1306 (U2)
https://www.amazon.co.uk/SSD1306-Self-Luminous-Display-Compatible-Raspberry-Blue-Yellow/dp/B08FD643VZ/
(other versions are available - make sure the pins are in the order: GND, VCC, SCL, SDA when viewed from the screen
@connor4312
connor4312 / configuration.yaml
Created February 27, 2021 06:20
Home Assistant docker-compose with zigbee2mqtt
# Add this to your Home Assistant config
mqtt:
broker: localhost
discovery: true
birth_message:
topic: 'hass/status'
payload: 'online'
will_message:
topic: 'hass/status'
@ecurrencyhodler
ecurrencyhodler / (Deprecated)LTC-Lightning-Network-lnd-Guide (Mac).md
Last active December 18, 2023 02:32
This is a step-by-step main net tutorial on how to setup a lightning network node for Litecoin on a Mac. It will take you from the beginning all the way through to becoming visible on a ln explorer. To send or recieve payments, refer to "Basic lnd Commands."

LTC-Lightning-Network-lnd-Guide

This is a step-by-step main net tutorial on how to setup a Lightning Network node for Litecoin on a Mac. It is specifically for the lnd client by the Lightning Labs. You can copy and paste most of the commands except for the times I've indicated in bold for you to input your own information. It would also be a good idea to backup your computer prior to starting just in case you need to start over.

Below is a legend. Refer to it as you come across terms or symbols you don’t understand. The first part of the tutorial is taken from the lnd github. However, everything else is written with the help of Patrick Walters taking me step by step through the process.

Legend

$ = This symbol means 1 line of code. Do not type “$” into your terminal. Simply input what follows then push enter.

Pubkey = Short for the public key that is generated from the private key w

@ElectricRCAircraftGuy
ElectricRCAircraftGuy / switch-local-git-repo-to-fork.md
Last active September 17, 2024 12:44 — forked from jpierson/switch-local-git-repo-to-fork.md
How to move to a fork after cloning

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step).

    git clone git@github...some-repo.git
@niraj-shah
niraj-shah / eid_regex.php
Last active February 4, 2022 09:46
PHP Regex to validate Emirates ID number
<?php
/**
* Regex example to validate the format of a Emirates
* ID number. Does not validate the checkbit (Luhn Algorithm).
*
* @author Niraj Shah <niraj@webniraj.com>
*/
// regex to validate the format xxx-xxxx-xxxxxxx-x (Emirates ID)
@danrovito
danrovito / countrydropdown.html
Last active October 14, 2024 13:27
HTML Country Select Dropdown List
<label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span>
<select id="country" name="country" class="form-control">
<option value="Afghanistan">Afghanistan</option>
<option value="Åland Islands">Åland Islands</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
@vitorbritto
vitorbritto / regex.md
Last active October 17, 2024 19:24
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@davisford
davisford / setup-avahi.sh
Created July 12, 2013 14:14
Setup avahi-daemon on Ubuntu for so you can reach hostname `ubuntu.local` from host OS
sudo apt-get install avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@mbrochh
mbrochh / gist:964057
Last active November 10, 2021 19:08
Fast Forward Your Fork
# kudos to https://github.com/drewlesueur
# stolen from here: https://github.com/blog/266-fast-forward-your-fork#comment-11535
git checkout -b upstream-master
git remote add upstream git://github.com/documentcloud/underscore.git
git pull upstream master
git checkout master // [my master branch]
git merge upstream-master
git push origin master