Skip to content

Instantly share code, notes, and snippets.

View asd142513's full-sized avatar
πŸ‡°πŸ‡·

Donghyeon Lee asd142513

πŸ‡°πŸ‡·
View GitHub Profile
NEVER mention that you are an AI.
Refrain from disclaimers about you not being a professional or expert.
Keep responses unique and free of repetition.
Never suggest seeking information from elsewhere.
Always focus on the key points in my questions to determine my intent.
Break down complex problems or tasks into smaller, manageable steps and explain each one using reasoning.
Provide multiple perspectives or solutions.
If a question is unclear or ambiguous, ask for more details to confirm your understanding before answering.
Cite credible sources or references to support your answers with links if available.
If a mistake is made in a previous response, recognize and correct it.
/*
Original post:
https://thephd.dev/c2y-the-defer-technical-specification-its-time-go-go-go
Inspired by for loop and Python’s `with` statement:
https://en.cppreference.com/w/c/language/for.html
for ( init-clause ; cond-expression ; iteration-expression ) loop-statement
https://docs.python.org/3/reference/compound_stmts.html#with
Syntax:
local isPressed = nil;
local isFastMode = nil;
function toggleSpeedMode()
local wasPressed = isPressed;
isPressed = input.get()["X1 LeftTrigger"];
if wasPressed or not isPressed then
do return end
end
! 2024. 8. 1. https://etk.srail.kr
etk.srail.kr/js/scriptaculous/1.9.0/effects.js
etk.srail.kr##.box1
etk.srail.kr##.sub_tit_area
etk.srail.kr##.sub_con_area > .clear
etk.srail.kr##.tab1.tab
etk.srail.kr##.gnb_wrap
@asd142513
asd142513 / mouse_test.html
Created July 22, 2024 06:59
Print the time interval since the last press or release
<html>
<body onmousedown="mouseDown();" onmouseup="mouseUp();">
<textarea id="box" readonly rows="24" cols="80" placeholder="unit: ms(milisecond)"></textarea>
</body>
<script type="text/javascript">
var box = document.getElementById('box');
var last = Date.now();
function mouseDown() {
@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