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 / deobfuscate-odttf-in-xps.js
Last active April 3, 2024 09:37
deobfuscate odttf file (extracted from M$ XPS file)
const purpose = "Purpose: deobfuscate odttf file (extracted from M$ XPS file)"
const usage = "Usage: node deobfuscate-odttf-in-xps.js <guid-obfuscated-font-file.odttf> [<output-file.ttf>]"
const obfuscatedStartOffset = 0 //start of obfuscated bytes in font file
const obfuscatedEndOffset = 32 //start of obfuscated bytes in font file
const guidSize = 32 // length of GUID string (only hex characters included)
const fs = require('fs')
const path = require('path')
@dungsaga
dungsaga / spleeter.md
Last active March 17, 2024 20:00
Voice removal AKA karaoke creator
@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!
@dungsaga
dungsaga / reduce-size-of-a-WSL-virtual-disk.md
Last active October 31, 2023 17:40
reduce size of a WSL virtual disk

Reduce size with diskpart

You should run PowerShell as Administrator (otherwise diskpart won't be able to received the piped commands)

$vhdx_path = '%USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx'

@"
select vdisk file=$vhdx_path
compact vdisk
@dungsaga
dungsaga / install_oracle_xe_18c_under_wsl2.md
Last active October 5, 2023 16:19
install Oracle XE 18x under WSL2

install Oracle XE 18x under WSL2

  • install package is RPM, it's easier to use CentOS 7 or 8 (from CentOS-WSL or wsldl)
  • if you want to use Debian/Ubuntu, you must convert RPM to DEB (but conversion with alien fails under Debian)
  • first, install oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
  • second, install oracle-database-xe-18c-1.0-1.x86_64.rpm
  • see https://mikesmithers.wordpress.com/2019/01/03/installing-and-configuring-oracle-18cxe-on-centos/
  • run as root: /etc/init.d/oracle-xe-18c configure
  • it would fail if host IP is auto-generated to be 127.0.1.1
  • you can update the IP in /etc /hosts and try it again
@dungsaga
dungsaga / Setting up Postfix on Debian.md
Created July 1, 2023 09:50 — forked from howyay/Setting up Postfix on Debian.md
A guide to set up a Postfix + Dovecot IMAP server with complete spf, dkim and dmarc support.

An ultimate guide to Postfix + Dovecot IMAP server with complete SPF, DKIM and DMARC support and additional instructions for a multi-domain setup

In this guide, domain.com will be your root domain and mail.domain.com will be the hostname of your mail server

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \
  sudo tee /etc/systemd/system/autossh@.service

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
@dungsaga
dungsaga / WSL2_VPN_Workaround_Instructions.md
Created July 1, 2023 09:49 — forked from machuu/WSL2_VPN_Workaround_Instructions.md
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active. The workaround breaks down into two problems:

  1. Network connection to internet
  2. DNS in WSL2

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@dungsaga
dungsaga / Fuck-Reddit.md
Created July 1, 2023 09:49
Make Reddit clients Alive again !!

Make Reddit clients Alive again !!

Reddit has imposed paid API limits and that compelled developers to shutodwn their clients.
But There is a way you can Keep using your favourite reddit Client.

Obtaining Client ID

Step 1: Navigate to this page.

image