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
#!/usr/bin/env node | |
const reladate = require('relative-date'), | |
https = require('https'); | |
const mooseShade = { | |
0: '\x1b[47mâ–‘', | |
1: '\x1b[47mâ–’', | |
2: '\x1b[47mâ–“', | |
3: 'â–ˆ', |
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
BITS 64 | |
CPU X64 | |
section .text | |
global _start | |
%macro mount 3 | |
mov rax, 0x53 ; sys_mkdir | |
mov rdi, %1 ; location | |
mov rsi, %3 ; mode |
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
/* | |
* Produce a continuous stream of `y's | |
* or `n's. | |
*/ | |
#include <stdio.h> | |
main(argc, argv) | |
char *argv[]; | |
{ |
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
BITS 64 | |
CPU X64 | |
global _start | |
section .text | |
_start: | |
inc rdi ; stdout, will not change after syscall | |
mov rsi, y ; will not change after syscall | |
mov rdx, 8192 ; will not change after syscall | |
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
BITS 64 | |
CPU X64 | |
section .text | |
global _start | |
_start: | |
dec ecx ; counter register used for repnz | |
pop rdi ; throw away argc, could be not 1 | |
pop rdi ; get argv[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
global _start | |
_start: | |
add edx, 1 | |
cmp byte [msg + edx], 0 | |
jne _start | |
mov eax, 4 ; sys_write | |
mov ebx, 1 ; to stdout | |
mov ecx, msg | |
; edx already contains number of bytes |
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 <math.h> | |
int isPrime(int n) { | |
int mask = n >> 31; | |
n = (mask ^ n) - mask; | |
if (n < 4) return 1; | |
else if (!(n & 1)) return 0; | |
unsigned short i; | |
for (i = 3; i <= sqrt(n); i+=2) { |
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
; this > GNU's coreutils true | |
global _start | |
_start: | |
mov eax, 1 | |
int 0x80 |