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
try { 2; console; 'myself'; } | |
catch (myself) { falling.asleep(instead) } | |
var ious = times = (wondering) => { | |
if (this.strange_dream(ends) & | |
"I'll wake up".and) | |
return home; } |
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
hc027@HC027:~$ nc -l -p 0 >> server.log & | |
[3] 13060 | |
hc027@HC027:~$ netstat -ltnp | grep nc # do rest in separate shell window | |
tcp 0 0 0.0.0.0:34033 0.0.0.0:* LISTEN 13060/nc | |
hc027@HC027:~$ nc localhost 34033 | |
Test Alexis hypothesis | |
^C | |
hc027@HC027:~$ cat server.log |
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
.section .data | |
.section .text | |
.globl _start | |
_start: | |
mov $1, %eax # this is the linux kernel command | |
# number (system call) for exiting | |
# a program |
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
queens = [] | |
def legalize(past): | |
row = [0 for i in range(8)] | |
for p_row in range(len(past)): | |
for i in range(len(past[p_row])): | |
if past[p_row][i] == "Q": | |
row[i] = 1 | |
if i - p_row >= 0: | |
row[i - p_row] = 1 |
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
from copy import deepcopy | |
# deepcopy allows us to pass | |
# arrays as function arguments | |
# by value instead of reference | |
# array of solutions | |
queens = [] | |
# generate new row, marking unthreatened rows | |
# with 0 and threatened riws as 1 |
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
.section .text | |
.globl _start | |
_start: | |
movl $5, %edi # number of fibnum we hunt | |
movl $0, %ebx # 1st fibnum | |
movl $1, %eax # 2nd fibnum | |
start_loop: | |
## Check if %edi is 0 | |
## (thus meaning %ebx is nth fibnum) |
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
.section .data | |
.section .text | |
.globl _start | |
_start: | |
movl $5, %edi # number of fibnum we hunt | |
movl $0, %ebx # 1st fibnum | |
movl $1, %eax # 2nd fibnum | |
start_loop: | |
## Check if %edi is 0 |
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
#include <stdlib.h> | |
int main(void) { | |
int edi = 5; // nth fib num | |
int ebx = 0; | |
int eax = 1; | |
int edx; // tmp | |
start_loop: | |
--edi; |
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
hc015@HC015:~$ readelf -e love_asm | |
ELF Header: | |
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 | |
Class: ELF64 | |
Data: 2's complement, little endian | |
Version: 1 (current) | |
OS/ABI: UNIX - System V | |
ABI Version: 0 | |
Type: EXEC (Executable file) | |
Machine: Advanced Micro Devices X86-64 |
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
.section .data | |
.section .text | |
.globl _start | |
_start: | |
movl $10, %edi # number of fibnum we hunt | |
movl $0, %ebx # 1st fibnum | |
movl $1, %esi | |
call _saveIP | |
_saveIP: |
OlderNewer