Skip to content

Instantly share code, notes, and snippets.

Avatar
🦑
🦜 🦜 🦜 🦜

Dongsung Kim kiding

🦑
🦜 🦜 🦜 🦜
View GitHub Profile
@nikolay-n
nikolay-n / syscalls.txt
Last active Mar 25, 2021
macOS syscall
View syscalls.txt
syscall = 0
exit = 1
fork = 2
read = 3
write = 4
open = 5
close = 6
wait4 = 7
link = 9
unlink = 10
@Treeki
Treeki / TurnipPrices.cpp
Last active Jul 20, 2021
AC:NH turnip price calculator
View TurnipPrices.cpp
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@Alex4386
Alex4386 / crossover-howtocompile.md
Last active May 19, 2021
CodeWeavers CrossOver - How to compile from source! for macOS
View crossover-howtocompile.md

[STOP] This gist is deprecated.

TL;DR

Instructions for Building CrossOver v20: https://gist.github.com/sarimarton/471e9ff8046cc746f6ecb8340f942647.
Current Development for Building Libre-version of CrossOver: https://github.com/GabLeRoux/macos-crossover-cloud-build.
For Latest Discussions: https://github.com/GabLeRoux/macos-crossover-cloud-build/issues.

Long Description

This version of gist is outdated since it was written while I was compiling CrossOver v19. and seems to be there are some breaking changes in v19.1+ and 20. Also, I think I missed some required libraries that was required in build (that I previously installed beforehand). Oops.

@nstarke
nstarke / netgear-private-key-disclosure.md
Last active Oct 21, 2020
Netgear TLS Private Key Disclosure through Device Firmware Images
View netgear-private-key-disclosure.md

Netgear Signed TLS Cert Private Key Disclosure

Overview

There are at least two valid, signed TLS certificates that are bundled with publicly available Netgear device firmware.

These certificates are trusted by browsers on all platforms, but will surely be added to revocation lists shortly.

The firmware images that contained these certificates along with their private keys were publicly available for download through Netgear's support website, without authentication; thus anyone in the world could have retrieved these keys.

@littlelailo
littlelailo / apollo.txt
Created Sep 27, 2019
Apple Bootrom Bug
View apollo.txt
This bug was also called moonshine in the beginning
Basically the following bug is present in all bootroms I have looked at:
1. When usb is started to get an image over dfu, dfu registers an interface to handle all the commands and allocates a buffer for input and output
2. if you send data to dfu the setup packet is handled by the main code which then calls out to the interface code
3. the interface code verifies that wLength is shorter than the input output buffer length and if that's the case it updates a pointer passed as an argument with a pointer to the input output buffer
4. it then returns wLength which is the length it wants to recieve into the buffer
5. the usb main code then updates a global var with the length and gets ready to recieve the data packages
6. if a data package is recieved it gets written to the input output buffer via the pointer which was passed as an argument and another global variable is used to keep track of how many bytes were recieved already
7. if all the data was recieved th
@perillamint
perillamint / nx-decrypt.sh
Last active Jun 3, 2018
Nintendo Switch system title batch decrypter
View nx-decrypt.sh
#!/bin/bash
HACTOOL=./hactool/hactool
KEYFILE=nintendo-switch-keys.dat
decrypt-nca() {
NCAFILE=$1
TARGDIR=$2
TITLEID=$($HACTOOL -k $KEYFILE -i $NCAFILE 2>/dev/null | grep Title\ ID\: | head -n 1 | sed 's/ //g' | cut -d ':' -f 2)
@foriequal0
foriequal0 / yaminjeongeum.user.js
Last active Aug 3, 2021
브라우저의 모든 텍스트를 야민정음으로 바꿔줍니다
View yaminjeongeum.user.js
// 브라우저에 GreaseMonkey(Firefox) TamperMonkey(Chrome) 을 설치하고,
// https://gist.github.com/foriequal0/154e73d3289d808e8ce94603f5eff6a4/raw/yaminjeongeum.user.js
// 위 링크를 브라우저에 입력하면 자동으로 스크립트를 설치하겠느냐는 창이 뜹니다.
// ==UserScript==
// @name yaminjeongeum
// @namespace yaminjeongeum.kr
// @description 야민정음
// @include *
// @exclude file://*
@mosquito
mosquito / README.md
Last active Aug 3, 2021
Add doker-compose as a systemd unit
View README.md

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
@kentwait
kentwait / mount_vbox_shared_boot.md
Last active Jul 16, 2021
Mount VirtualBox shared folder on boot using fstab
View mount_vbox_shared_boot.md

How to mount a VirtualBox shared folder when the Guest OS boots

Problem

While using VirtualBox's Guest Additions to mount shared folders provides a seamless way to mount shared folders, there are also disadvantages.

  • Shared folders will always mount in /media/sf_(share name) unless specified using through vbox drivers in the guest OS
  • Mounting does not happen at boot-time. Applications that require paths at boot will not be able to access the shared folder even after it is mounted - such as Docker.

Solution

Instead of relying on Guest Additions, if you have sudo permissions, shared folders can be mounted at boot-time using fstab. Using this approach allows

@xnuk
xnuk / hyeong.md
Last active Jul 19, 2021
난해한 혀엉.... 언어
View hyeong.md

난해한 혀엉... 언어 v0.4.5

  • (U+2026), (U+22EF), (U+22EE)는 모두 .(U+002E)가 3번 연속으로 나열된 것과 같은 것으로 봅니다.
  • "한글 음절 문자"는 가(U+AC00) 이상 힣(U+D7A3) 이하의 유니코드 문자들을 의미합니다.

스택

  • 스택의 모든 원소는 유리수 또는 NaN으로 이루어져 있습니다. 분모가 1인 유리수를 편의상 정수라고 칭합니다.
    • NaN은 특수한 숫자처럼 취급됩니다. 어떠한 연산을 하더라도 그 연산에 NaN이 있을 경우 그 연산의 값은 NaN이 됩니다.