Skip to content

Instantly share code, notes, and snippets.

View asd142513's full-sized avatar
🇰🇷

Donghyeon Lee asd142513

🇰🇷
  • Gurum Networks
  • Seoul, Korea
View GitHub Profile
@asd142513
asd142513 / State::new.rs
Created December 22, 2023 06:05
black box
impl State {
fn new(valves: &[Valve]) -> Self {
// let valve_states = black_box(valves)
// .iter()
// .map(|valve| valve.rate == 0)
// .collect();
let mut valve_states = Vec::with_capacity(black_box(valves).len()); // Fast
for valve in valves {
valve_states.push(black_box(valve).rate == 0);
@asd142513
asd142513 / input.txt
Last active December 22, 2023 04:25
AoC 2022 Day 16 part 1
IK 6 EU XY AD SC CH
YW 11 HD MW ID JD BJ
HD 0 YW AA
LZ 0 CR IT
LO 0 CH YB
PM 0 EN YB
ME 0 VP TX
CK 0 MD LL
RM 0 TX AA
MU 0 MD BX
@asd142513
asd142513 / scroll
Last active December 12, 2023 07:42
Disable scroll perturbation
xinput
xinput list-props <device-id>
xinput set-prop <device-id> <property-id of High Resolution Wheel Scroll Enabled> 0
@asd142513
asd142513 / trim.sh
Last active November 28, 2023 07:13
fix line ending
for dir in */ ; do
pushd $dir
git diff --name-only | xargs -Iarg sed -i 's/\r$//' arg
popd
done
Atmel was subsumed by Microchip Technology in 2016
Atmel-ICE
a development hardware
supports JTAG, SWD, PDI, TPI, aWire, SPI, debugWIRE, UPDI interfaces
AVR dragon
a development hardware
perform a symbolic debug on all devices with OCD with SPI, JTAG, PDI (selected devices), high voltage serial programming, parallel programming, aWire modes
supports debugging using SPI, JTAG, PDI interfaces
JTAG
Joint Test Action Group
from time import sleep
import chromedriver_autoinstaller
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
import winsound
chromedriver_autoinstaller.install()
base_url = 'http://prod.danawa.com/info/?pcode='
@asd142513
asd142513 / ascii.bf
Created October 16, 2021 18:23
Print ASCII code
>+++++ +++++>> >,
[
>+++++ +++++
[<[->->]<]
<<
[
>>>>[<<<<->>>>-]>>
>+++++ +++++>>+<<
[<[->->]<]