Skip to content

Instantly share code, notes, and snippets.

@thewheat
thewheat / server.md
Last active April 29, 2024 11:29
Simple HTTP server examples catered for accessing/sharing files via a web browser

Simple HTTP servers for file transfers

  • Examples of how to set up simple HTTP servers with different languages / libaries
  • Main use case is for
    • HTML pages
    • file transfers
  • Access via a browser with a format like http://your.ip.address.or.hostname.here:8080 (e.g. http://127.0.0.1:8080 / http://localhost:8080 / http://192.168.0.1:8080)
    • Local access IP: 127.0.0.1 / localhost
    • Remote access IP:
      • Some servers will show the IP address in the output

Intercom user_hash

Remember that your secret key should never be exposed to the public

  • So Javascript code below should only be used for testing unless modified and used to run on a server
@thewheat
thewheat / brunei_calendar.csv
Last active December 22, 2023 11:24
Brunei Calendar Dates for Public Holidays, School Terms, School Term Holidays based
Name Type Start Date End Date Moon Dependent Notes
New Year's Day Public Holiday 2024-01-01 2024-01-01 N Monday
Isra' Mi'raj Public Holiday 2024-02-08 2024-02-08 N Thursday
Chinese New Year Public Holiday 2024-02-10 2024-02-10 N Saturday
Chinese New Year Public Holiday Replacement (Private) 2024-02-12 2024-02-12 N Monday
National Day Public Holiday 2024-02-23 2024-02-23 N Friday
National Day Public Holiday Replacement (Government) 2024-02-24 2024-02-24 N Saturday
First Day of Ramadhan Public Holiday 2024-03-12 2024-03-12 Y Tuesday 2024-03-12 / Wednesday 2024-03-13
Nuzul Al-Qur'an Public Holiday 2024-03-28 2024-03-28 Y Thursday 2024-03-28 / Friday 2024-03-29
Hari Raya Public Holiday 2024-04-10 2024-04-12 Y 3 days starting on Wednesdaty 2024-04-10 / Thursday 2024-04-11
@thewheat
thewheat / bash.md
Last active October 13, 2023 23:49
test text file
# Quick start for youtube-dl
- https://github.com/ytdl-org/youtube-dl/
## Default usage
youtube-dl URL
## Download certain resolution
youtube-dl -f "best[height<=480]" URL
## Download certain extension
@thewheat
thewheat / i3.md
Last active January 11, 2022 09:52

Quikcstart for i3 Tiling Window Manager

  • https://i3wm.org/

  • Initiate commands with Mod key

  • Mod key: Win / Alt depending on configuration

  • By default tiles horizontally

General