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
| int is_c99(void) | |
| { | |
| int r=0,b=1,c=2; | |
| r = b //*kek*/c | |
| ; | |
| return r; | |
| } |
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
| // 16-bit and 32-bit modrm encoder in x86. | |
| // nothing fancy | |
| FILE *out; | |
| // The bitness of the output | |
| // within operating system code can change from one | |
| // instruction to another instruction. | |
| int bits; |
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
| org 0x0800 | |
| cpu 386 | |
| bits 16 | |
| ;;___________________________________________________________________________;; | |
| ;; This file is Volume Boot Record that loads a single file from FAT32 | |
| ;; onto the address 0x1000 and jumps to that address. I created this file | |
| ;; mainly for demonstration that one doesn't need additional sectors for | |
| ;; simple bootloaders. |
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 code is Public Domain | |
| // General information: | |
| // Thread safety: none, wrap in a mutex or something | |
| // Allocator type: combination of freelist and bitmap allocator | |
| // Usage: | |
| // include bballoc.h in every file that uses functionality from the library. | |
| // define bballoc_implementation in EXACTLY one of the files. |
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<stdio.h> | |
| #pragma message "Enable SSE? (Enter 0 or 1)" | |
| enum { | |
| sse = | |
| #include</dev/stdin> | |
| }; | |
| #pragma message "Enable Logging? (Enter 0 or 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
| package main; | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "io" | |
| "os" | |
| "path" | |
| "path/filepath" | |
| "github.com/fsnotify/fsnotify" |
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
| #define LO32(x) (x&((UINT64_C(1)<<32)-1)) | |
| #define HI32(x) (x >> 32) | |
| // Returns the high 64-bits of the 128-bit result. | |
| // the `result` variable specifies the address of the low 64-bits | |
| static uint64_t add_u64(uint64_t *result, uint64_t a, uint64_t b) | |
| { | |
| uint64_t al = LO32(a); | |
| uint64_t ah = HI32(a); |
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<stdbool.h> | |
| #include<stdio.h> | |
| #define WIN32_LEAN_AND_MEAN | |
| #include<Winsock2.h> | |
| #include<Ws2tcpip.h> | |
| #define nil ((void *)0) | |
| #define kb 1024 |
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 script correctly sorts strings that contain mix of characters | |
| # and numbers. | |
| # For example it is common for files in filesystems to | |
| # have the following names: | |
| # "file1" | |
| # "file2" | |
| # ... | |
| # "file10" | |
| # Though most operating systems sort blindly by comparing |
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
| n = 10 | |
| # stack data | |
| class t_stack: | |
| arr = 0; | |
| top = 0; | |
| def __init__(self): | |
| self.arr = []; |