Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

View dungsaga's full-sized avatar
👻
ghost in the machine

DungSaga dungsaga

👻
ghost in the machine
View GitHub Profile
@dungsaga
dungsaga / Hirofumi-Nakai-Improved.md
Last active September 25, 2025 10:04
Hirofumi Nakai Improved (HNI) - a method for Doomsday calculation

Hirofumi Nakai Improved

The Doomsday rule was devised by John Conway in 1973 to compute the day of week in your head (https://en.wikipedia.org/wiki/Doomsday_rule). Others have made improvements for easier mental calculation.

Currently, the simplest one is published in 2023 in the paper "A Simple Formula for Doomsday" by Hirofumi Nakai (https://thatsmaths.com/2023/06/22/a-simple-formula-for-the-weekday/).

  • split the year into century part and the remaining 2-digit part: Y = 100c + y
  • compute the modulo 4 of these 2 parts: c₄ = c % 4, y₄ = y % 4
  • the Doomsday would be (5(c₄ + y₄ - 1) + 10y) % 7
<?php
/**
* Adminer plugin that display the first CHAR/VARCHAR column of the foreign key
*
* @category Plugin
* @link http://www.adminer.org/plugins/#use
* @author Bruno VIBERT <http://www.netapsys.fr>
* @modified by Peter Hostačný <hostacny.peter AT gmail.com>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
@dungsaga
dungsaga / 01-next-html.md
Last active July 30, 2025 06:52
what's the next HTML version? HTML6!?
@dungsaga
dungsaga / bash_strict_mode.md
Created March 18, 2025 02:26 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@dungsaga
dungsaga / fix-osnews.md
Last active February 9, 2025 10:37
fix invisible titles in osnews.com
@dungsaga
dungsaga / rfc3161.txt
Created July 26, 2024 07:52 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
@dungsaga
dungsaga / move-user-profile-folder.md
Last active July 13, 2024 01:41
move user profile folder of windows

move user profile folder of windows 7

  • During installation, instead of typing your username and computer name, press CTRL + SHIFT + F3 to boot into Audit Mode
  • After booting into Audit Mode, click Cancel in the window "System Preparation Tool 3.14"
  • Create a XML file (such as D:\relocate.xml) containing instructions to move user profiles
  • Run %windir%\system32\Sysprep\Sysprep.exe /audit /reboot /unattend:D:\relocate.xml
  • After rebooting again, click OK in the window "System Preparation Tool 3.14"
  • Continue with normal installation
@dungsaga
dungsaga / salvage-pdf.py
Last active December 11, 2024 05:30
Salvage text from a broken pdf file
#!/usr/bin/env python3
import re, zlib, sys
def main(argv):
print("Salvage text from a broken pdf file")
print("Usage: salvage-pdf.py [<input_file.pdf> [<output_file.txt>]]")
pdf = argv[1] if len(argv) > 1 else sys.stdin.fileno()
input = open(pdf, "rb").read()
output = salvage_pdf(input)
txt = argv[2] if len(argv) > 2 else sys.stdout.fileno()
@dungsaga
dungsaga / custom_game_engines_small_study.md
Created November 9, 2023 09:27 — forked from raysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@dungsaga
dungsaga / lisp-resources-digikar-2020.md
Created November 9, 2023 04:35 — forked from digikar99/lisp-resources-digikar-2020.md
If programming is more than just a means of getting things done for you, then Common Lisp is for you!