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 python3 | |
| import sys | |
| import requests | |
| from bs4 import BeautifulSoup | |
| def get_links(url): | |
| soup = BeautifulSoup(requests.get(url).text, 'html.parser') | |
| for a in soup.find_all('a'): | |
| href = a.get('href') |
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
| /* | |
| * 8-bit bitwise addition (full adder) implemented using only bitwise operations. | |
| * Luke McCarthy 2021-10-06 | |
| */ | |
| #include <assert.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| static uint8_t carry(uint8_t A, uint8_t B, uint8_t C) |
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/sh | |
| download_videos() { | |
| yt-dlp --download-archive archive -ciw -o "%(upload_date)s %(id)s %(title)s.%(ext)s" -v "$@" | |
| } | |
| find . -type d | while read dir; do | |
| if [ -f "$dir/url" ]; then | |
| (cd "$dir" && download_videos "$(cat url)") | |
| fi |
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
| TARGETNAME := my-program | |
| BUILDDIR := build | |
| SRCDIRS := src | |
| INCDIRS := include | |
| LIBDIRS := | |
| LIBS := | |
| DEFINES := | |
| PKGS := | |
| STDC := c11 | |
| STDCPP := c++20 |
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
| defaults,nls=utf8,umask=000,dmask=022,fmask=133,uid=1000,gid=1000,windows_names |
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
| <!DOCTYPE html> | |
| <style> | |
| body { overflow: hidden; background-color: #000; } | |
| #display { position: absolute; top: 0; left: 0; } | |
| </style> | |
| <canvas id="display"></canvas> | |
| <script> | |
| display.width = window.innerWidth; | |
| display.height = window.innerHeight; | |
| var x = 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
| #!/bin/sh | |
| HDA=disk.img | |
| run_qemu() { | |
| qemu-system-i386 \ | |
| -cpu pentium \ | |
| -m size=64M \ | |
| -vga cirrus \ | |
| -soundhw sb16,adlib \ |
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
| fn cString(comptime str: []const u8) [*]const u8 { | |
| return &(str ++ "\x00"); | |
| } | |
| fn cStringArray(comptime strArray: [][]const u8) [*]const ?[*]const u8 { | |
| comptime var out : [strArray.len + 1] ?[*]const u8 = undefined; | |
| inline for (strArray) |str, i| { | |
| out[i] = comptime cString(str); | |
| } | |
| out[strArray.len] = null; |
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
| const std = @import("std"); | |
| const ExprType = enum { | |
| Val, | |
| Var, | |
| Add, | |
| Mul, | |
| }; | |
| const Value = u32; |
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
| const std = @import("std"); | |
| use std.os.windows; | |
| pub extern "kernel32" stdcallcc fn GetCommandLineW() LPWSTR; | |
| pub extern "kernel32" stdcallcc fn LocalFree(hMem: *c_void) ?*c_void; | |
| pub extern "shell32" stdcallcc fn CommandLineToArgvW(lpCmdLine: LPCWSTR, out_pNumArgs: *c_int) ?[*]LPWSTR; | |
| pub const ArgIteratorWindows = struct { | |
| index: usize, | |
| count: usize, |