This file contains hidden or 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
#!/bin/bash | |
color() { | |
echo -en "\e[48;2;$1;$2;$3m " | |
} | |
reset() { | |
echo -e "\e[m" | |
} |
This file contains hidden or 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
# vim: ts=8 sw=8 | |
# build and execute | |
# $ gcc -mx32 -nostdlib -static -s -Wl,--build-id=none,-Ttext,0x400074 fizzbuzz.s | |
# $ dd if=a.out of=fizzbuzz count=236 bs=1 | |
# $ chmod +x fizzbuzz | |
# $ ./fizzbuzz | |
.text | |
.Sfizzbuzz: | |
.ascii "Fizz" |
This file contains hidden or 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
# vim: ts=8 sw=8 | |
# build and execute | |
# $ gcc -mx32 -nostdlib -static -s -Wl,--build-id=none,-Ttext,0x400074 fizzbuzz.s | |
# $ dd if=a.out of=fizzbuzz count=258 bs=1 | |
# $ chmod +x fizzbuzz | |
# $ ./fizzbuzz | |
.text | |
.Sfizzbuzz: | |
.ascii "Fizz" |
This file contains hidden or 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
# vim: ts=8 sw=8 | |
# build and execute | |
# $ gcc -mx32 -nostdlib -static -s -Wl,--build-id=none,-Ttext,0x400094 fizzbuzz.s | |
# $ dd if=a.out of=fizzbuzz count=272 bs=1 | |
# $ chmod +x fizzbuzz | |
# $ ./fizzbuzz | |
.bss | |
.ds.b 15 | |
.Snumber: |
This file contains hidden or 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
# vim: ts=8 sw=8 | |
# build and execute | |
# $ gcc -mx32 -nostdlib -static -s -Wl,--build-id=none,-Ttext,0x400094 fizzbuzz.s | |
# $ dd if=a.out of=fizzbuzz count=286 bs=1 | |
# $ chmod +x fizzbuzz | |
# $ ./fizzbuzz | |
.bss | |
.ds 15 | |
.Snumber: |
This file contains hidden or 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
// vim: ts=8 sw=8 | |
// build and execute | |
// $ gcc -nostdlib -static -s fizzbuzz.s -o fizzbuzz | |
// $ ./fizzbuzz | |
.section .rodata | |
.Sfizz: | |
.asciz "Fizz\n" | |
.Sbuzz: | |
.asciz "Buzz\n" |
This file contains hidden or 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
use std::net::TcpListener; | |
use std::io::Write; | |
fn main() { | |
let listener = TcpListener::bind("127.0.0.1:8080").unwrap(); | |
for stream in listener.incoming() { | |
match stream { | |
Ok(mut stream) => { | |
let _ = stream.write(b"test\n"); |
This file contains hidden or 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
gosh> (define x (lambda (x y . z) (print "x = " x) (print "y = " y) (print "z = " z))) | |
x | |
gosh> (x 10 20) | |
x = 10 | |
y = 20 | |
z = () | |
#<undef> | |
gosh> (x 10 20 30 40 50) | |
x = 10 | |
y = 20 |