Skip to content

Instantly share code, notes, and snippets.

View Alex4386's full-sized avatar
πŸ’­
μ‘Έμ—…μ‹œμΌœμ€˜

Sanghee Park Alex4386

πŸ’­
μ‘Έμ—…μ‹œμΌœμ€˜
View GitHub Profile
@Alex4386
Alex4386 / sevensegments.ino
Last active September 17, 2019 09:21
SevenSegmentsDisplay Library for Arduino
typedef struct SevenSegmentCombination {
bool pinA;
bool pinB;
bool pinC;
bool pinD;
bool pinE;
bool pinF;
bool pinG;
} SevenSegmentCombination;
@Alex4386
Alex4386 / SevenSegments.h
Last active September 23, 2019 05:35
Seven Segments Display Library for Arduino
typedef struct SevenSegmentCombination {
bool pinA;
bool pinB;
bool pinC;
bool pinD;
bool pinE;
bool pinF;
bool pinG;
} SevenSegmentCombination;
@Alex4386
Alex4386 / mac-addr-changer.sh
Created November 1, 2019 11:25
The MAC Address Changer
#!/bin/bash
echo "The Mac Changer"
echo
echo "Copyright (c) Alex4386, Distributed under HRPL"
read -p "Type Interface you want to change: " interface
read -p "Type Mac Address you want to change: " mac
echo
echo Backing up your previous mac
ifconfig $interface | grep ether > mac_bak.txt
echo Backup is now available at mac_bak.txt
@Alex4386
Alex4386 / .zshrc
Created November 6, 2019 10:58
NEW .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# whether you need verbose boot results: 0 to disable
VERBOSE=0
# Verbose Terminal Start
if [ ! $VERBOSE = 0 ]; then
figlet Alex4386
echo "Copyright (c) Alex4386"
@Alex4386
Alex4386 / ASM4Newbies.md
Last active December 3, 2019 10:43
16-bit assembly information for contributing ReC98 Project

Registers

  • ax, bx, cx, dx general purpose registers (16 bits)

ah: 8bit from front (a-HIGH)
al: 8bit from back (a-LOW)

  • ip, sp, bp ip: instruction pointer
    sp, bp: stack stuff. get it?
@Alex4386
Alex4386 / db-jinda-parser.js
Created December 10, 2019 05:54
μ΄ν˜Έμ‹ μ•„μ €μ”¨μ˜ ν•œνŽΈ λ‚˜λΌκ°€ λ””λΉ„μ§„λ‹€μ—μ„œ 핡심을 μΆ”μΆœν•΄ λƒ…λ‹ˆλ‹€. λΈŒλΌμš°μ € μ½˜μ†”μ—μ„œ 이 것을 μ‹€ν–‰ ν•˜μ„Έμš”.
try {
let e;
let tweets;
} catch(e) { }
d = document;
tweets = d.getElementsByClassName("r-1j3t67a");
for ( const tweet of tweets ) {
try {
@Alex4386
Alex4386 / thwiki-crawler.js
Last active March 9, 2021 10:51
Mirror of Character List of Touhou Wiki
const data = [];
const characters = $0.getElementsByTagName("li")
for (const character of characters) {
const charName = character.getElementsByTagName("a")[0].innerText;
console.log(charName);
data.push(charName);
}
@Alex4386
Alex4386 / crossover-howtocompile.md
Last active August 13, 2025 12:17
CodeWeavers CrossOver - How to compile from source! for macOS

[STOP] This gist is deprecated.

TL;DR

WAY MORE UP-TO-DATE GIST (and includes some setup stuff that I forgot to document): 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/stub files that was required in build (that I previously installed beforehand). Oops.

@Alex4386
Alex4386 / emergency-escape.sh
Created February 17, 2020 04:03
κΈ΄κΈ‰νƒˆμΆœ ν”„λ‘œν† μ½œ
#!/bin/bash
mkdir ~/.escape
echo "μ•ˆλ…•νžˆ κ³„μ„Έμš” μ—¬λŸ¬λΆ„" > ~/.escape/msg.txt
echo "μ €λŠ” 이 세상 λͺ¨λ“  κ΅΄λ ˆμ™€ 속박을 λ²—μ–΄λ˜μ§€κ³ " >> ~/.escape/msg.txt
echo "제 행볡을 μ°Ύμ•„ λ– λ‚©λ‹ˆλ‹€" >> ~/.escape/msg.txt
echo " " >> ~/.escape/msg.txt
echo "μ—¬λŸ¬λΆ„λ„ ν–‰λ³΅ν•˜μ„Έμš”~" >> ~/.escape/msg.txt
cat ~/.escape/msg.txt | wall
function isSorted(a) {
for (let i = 0; i < a.length - 1; i++) {
if (a[i] > a[i+1]) return false;
}
return true;
}
function bogoSort(a) {
while (!isSorted(a)) {
a.sort(() => Math.random() - 0.5);