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
| GOAL: Make each pair of (n) lines match | |
| (0) this is a pair of lines | |
| (0) this is a pair of lines | |
| (1) this is a pair of lines |
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
| dig aaaa example.com | |
| curl -6 "http://[2606:2800:21f:cb07:6820:80da:af6b:8b2c]" -H "Host: example.com" |
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
| ^[A-Za-z0-9-_:.,;!?~*'()/=+&%@#]+$ |
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
| b64:e3I9MTAwMCxyMj0xMDAwLHUxPTEwMCx1Mj0yMDB9 |
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 Duck = struct { | |
| name: []const u8, | |
| grade: u8 = undefined, | |
| }; | |
| const DuckGrader = struct { | |
| pub fn grade(_: *DuckGrader, duck: *Duck) void { | |
| duck.grade = if (duck.name.len > 1) duck.name[0] else 'Z'; |
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
| pub const Account = packed struct { | |
| id: u128, | |
| /// Opaque third-party identifier to link this account (many-to-one) to an external entity. | |
| user_data: u128, | |
| /// Reserved for accounting policy primitives. | |
| reserved: [48]u8, | |
| ledger: u32, | |
| /// A chart of accounts code describing the type of account (e.g. clearing, settlement). | |
| code: u16, | |
| flags: AccountFlags, |
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
| { | |
| "title": "Double left_shift to become caps_lock", | |
| "rules": [ | |
| { | |
| "description": "Double left_shift to become caps_lock.", | |
| "manipulators": [ | |
| { | |
| "conditions": [ | |
| { | |
| "name": "left_shift pressed", |
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
| { | |
| "title": "Double left_command to become caps_lock", | |
| "rules": [ | |
| { | |
| "description": "Double left_command to become caps_lock.", | |
| "manipulators": [ | |
| { | |
| "conditions": [ | |
| { | |
| "name": "left_command pressed", |
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
| function ser(n1,n2,n3,n4) | |
| return (n1&0xff)<<8 | n2&0xff | | |
| (n3&0xff)>>8 | (n4&0xff)>>16 | |
| end | |
| function deser(n) | |
| return { | |
| (n>>8) & 0xff, | |
| n&0xff, | |
| (n<<8) & 0xff, |
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
| // input "" -> null | |
| // input "()" -> [] | |
| // input "(1)" -> [1] | |
| // 0123456 | |
| // const input = "(first (list 1 (+ 2 3) 9))" | |
| // example out: ["first", ["list", 1, ["+", 2, 3], 9]] | |
| // (+ 2 3) -> ["+", 2, 3] | |
| // (list 1 (+ 2 3) 9) -> ["list", 1, ["+", 2, 3], 9] | |
| function parse(input) { |
NewerOlder