Skip to content

Instantly share code, notes, and snippets.

View adk96r's full-sized avatar
🏠
Working from home

Aditya K. adk96r

🏠
Working from home
View GitHub Profile
@adk96r
adk96r / js
Last active March 28, 2026 19:35
Solution for AoC#2
const allReports = `` // For simplicity, I chose to keep the input here instead of accepting as CLI input
const splitReports = allReports.split('\n')
.filter(report => report.length)
.map(report => report.split(' ').map(val => parseInt(val)))
function isReportSafe(report) {
const isIncreasing = report[0] < report[1];
return report.every((val, i) => {
if (i === 0) return true; // skip initial position
@adk96r
adk96r / Vitual keystroke example
Created August 18, 2016 18:12 — forked from chriskiehl/Vitual keystroke example
Python win32api simple Vitual keystroke example
#Giant dictonary to hold key name and VK value
VK_CODE = {'backspace':0x08,
'tab':0x09,
'clear':0x0C,
'enter':0x0D,
'shift':0x10,
'ctrl':0x11,
'alt':0x12,
'pause':0x13,
'caps_lock':0x14,