This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
mnemonics = """ | |
ADC AND ASL BCC BCS BEQ BIT BMI BNE BPL BRK BVC BVS CLC | |
CLD CLI CLV CMP CPX CPY DEC DEX DEY EOR INC INX INY JMP | |
JSR LDA LDX LDY LSR NOP ORA PHA PHP PLA PLP ROL ROR RTI | |
RTS SBC SEC SED SEI STA STX STY TAX TAY TSX TXA TXS TYA | |
""".split() | |
for m in mnemonics: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
while ( [ ! -e /dev/ttyACM0 ] ) { | |
echo wait... | |
sleep 0.2 | |
} | |
# To program, use something like: | |
# sudo echo && (make && avrwait && sudo avrdude.sh -V -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:Keyboard.hex) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M-x replace-regexp 0b\([01]+\) \,(format "0x%X" (string-to-number \1 2))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import tempfile | |
import win32file | |
from glob import glob | |
def get_link_count(filename): | |
if os.path.isdir(filename): | |
dwFlagsAndAttributes = win32file.FILE_FLAG_BACKUP_SEMANTICS | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Make the Emacs window full-screen on Windows | |
At present, this will only adjust the first Emacs frame found. It could be modified to use | |
win32api.EnumWindows and win32api.GetClassName / win32api.GetWindowText in order to adjust all | |
Emacs frames. | |
""" | |
import argparse | |
import sys | |
import win32gui |