Skip to content

Instantly share code, notes, and snippets.

Seena Burns seenaburns

Block or report user

Report or block seenaburns

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@seenaburns
seenaburns / strtoi-add-argv.s
Last active Apr 16, 2019
ARM assembly to take parse argv[1], argv[2] as ints, add them, and print them back to stdout
View strtoi-add-argv.s
// Building (on x86):
//
// arm-linux-gnueabi-as -o strtoi-add-argv.o strtoi-add-argv.s
// arm-linux-gnueabi-ld -o strtoi-add-argv strtoi-add-argv.o
//
// Running:
// qemu-arm strtoi-add-argv 100 23; echo $?
//
.data
@seenaburns
seenaburns / strtoi-add-argv.arm
Created Apr 16, 2019
ARM program to take parse argv[1], argv[2] as ints, add them, and print them back to stdout
View strtoi-add-argv.arm
.data
Input:
.ascii "89\0"
NewlineString:
.ascii "\n\0"
TestString:
.ascii "Some string\n\0"
@seenaburns
seenaburns / getattr_example.py
Last active Dec 11, 2015
Overriding __getattr__ for the sake of API Design
View getattr_example.py
class Color:
def __init__(self):
pass
def __getattr__(self, name):
if name is 'saturation':
# Warn user of hls / saturation
saturation_warning = 'Color.saturation is ambiguous. Use Color.hls_saturation or Color.hsv_saturation'
raise AttributeError(saturation_warning)
else:
You can’t perform that action at this time.