Skip to content

Instantly share code, notes, and snippets.

@gyng
gyng / investing-sg.md
Last active April 4, 2025 19:39
Basics of investing as a Singaporean

Quickstart to investing as a Singaporean

  1. Put aside 6 * monthly spend as your emergency fund. Keep as cash in your high-yield savings account with a bank, or in things that can be quickly converted to cash such as money-market funds. This piggy bank will keep you alive in emergencies such as unforseen retrenchments.

  2. Get term hospitalisation/critical illness and/or MediShield. DO NOT INVEST USING INSURANCE IT'S A SCAM

  3. Decide on your goals (eg, HDB in 5 years, early retirement in 10). This is the hard part and determines how much you save and invest and your asset allocation.

  4. Find your investing ratio. Monthly salary - monthly expenses - some fun money. Eg, if you earn $1000, spend $300 on food and bills, and spend $200 on gacha, you can invest $500 (50%) of your monthly income.

@gyng
gyng / README.md
Last active March 6, 2024 14:02
Get Google Maps Location History manually from the browser

Get Google Maps Location History manually from the browser

  1. Modify startDate and endDate
  2. Paste this into your browser while logged in to Google
  3. Manually open each URL in the browser: it should download the KML for the day

Notes

  • Google's API only returns a maximum of one day's of data
  • You have to merge the resulting KML yourself
@gyng
gyng / config-no-hass.yaml
Last active April 30, 2024 10:32
Setting up AirGradient ONE v9 with ESPHome to export Prometheus metrics
# AirGradient ONE - Board v9
# https://www.airgradient.com/open-airgradient/instructions/overview/
#
# This configuration was blatantly yoinked from:
# https://github.com/MallocArray/airgradient_esphome/blob/main/airgradient-one.yaml
#
# (see https://github.com/geerlingguy/airgradient-prometheus/issues/39)
# Needs ESPHome 2023.7.0 or later
@gyng
gyng / rtmaze.mermaid
Last active December 18, 2023 18:21
40K Rogue Trader Act 4 Quetza Temer jungle maze template, random?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gyng
gyng / config.md
Created May 4, 2022 09:16
Setting up VSCode remote SSH server for Ubuntu
@gyng
gyng / gist:959936064ce4509cc9b0a199a88239e5
Created March 9, 2022 19:52
Twitter promoted tweets ublock filter
twitter.com##article div[aria-describedby="tweet-education-header"][role=button] > div > span > span:has-text(/^Follow Topic$/):upward(article):upward(3)
twitter.com##[data-testid="tweet"]:has-text(Follow Topic):upward(3)
using Dummiesman;
using System.IO;
using System.Text;
using UnityEngine;
using UnityEngine.Networking;
using System.Collections;
public class OBJGenerator : MonoBehaviour
{
@gyng
gyng / a.md
Last active March 25, 2025 11:56
Awair Grafana dashboard

https://i.imgur.com/mPgtdla.png

@gyng
gyng / debug.py
Created August 25, 2021 06:29
Python debuggin for vscode
import debugpy
try:
debugpy.listen(("0.0.0.0", 5678))
debugpy.wait_for_client()
except RuntimeError:
pass
breakpoint()
@gyng
gyng / index.d.ts
Created October 2, 2020 05:46
SVGR TypeScript + Jest definitions
declare module "*.svg" {
import * as React from "react";
const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
export { ReactComponent };
export default ReactComponent;
}