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
| async function createCommitOnBranch(octokit, input) { | |
| const result = await octokit.graphql('mutation($input:CreateCommitOnBranchInput!){createCommitOnBranch(input:$input){commit{oid}}}', {input}) | |
| return result.createCommitOnBranch.commit.oid | |
| } | |
| async function createCommitOnBranchInput(repo, target, commit, overrideParent = undefined) { | |
| const sha = trimSuffix(await git(false, 'rev-parse', '--verify', commit), '\n') // will fail not a valid commit rev | |
| const parents = overrideParent ?? trimSuffix(await git(false, 'rev-parse', sha + '^@'), '\n').split('\n') | |
| const subject = trimSuffix(await git(false, 'show', '--no-patch', '--format=%s', sha), '\n') | |
| const body = trimSuffix(await git(false, 'show', '--no-patch', '--format=%b', sha), '\n') |
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
| // as of linux v7.0 | |
| discovery_nqn="nqn.2014-08.org.nvmexpress.discovery" // string < 256, must not have the same nqn as any subsystem | |
| subsystem/nqn/ | |
| attr_allow_any_host=true // cannot set attr_allow_any_host=false if have allowed_host (EINVAL) | |
| attr_version="1.3" // nvme version X.Y or X.Y.Z (EINVAL); cannot set once discovered (EINVAL); ignored and cannot set if passthru.enable (EINVAL); default 2.1.0 | |
| attr_serial="" // ascii (0x20 <= c <= 0x7e), len <= 20 (EINVAL); cannot set once discovered (EINVAL); default random | |
| attr_model="" // ascii (0x20 <= c <= 0x7e), len <= 40 (EINVAL); cannot set once discovered (EINVAL); default "Linux" | |
| attr_firmware="" // ascii (0x20 <= c <= 0x7e), len <= 8 (EINVAL); cannot set once discovered (EINVAL); default UTS_RELEASE |
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> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <style> | |
| body { | |
| color-scheme: dark; | |
| background: #000; | |
| color: #fff; |
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
| android.util.Log.i("MaterialColors", String.format("system_accent1_0=#%08x", getResources().getColor(android.R.color.system_accent1_0, null))); | |
| android.util.Log.i("MaterialColors", String.format("system_accent1_10=#%08x", getResources().getColor(android.R.color.system_accent1_10, null))); | |
| android.util.Log.i("MaterialColors", String.format("system_accent1_50=#%08x", getResources().getColor(android.R.color.system_accent1_50, null))); | |
| android.util.Log.i("MaterialColors", String.format("system_accent1_100=#%08x", getResources().getColor(android.R.color.system_accent1_100, null))); | |
| android.util.Log.i("MaterialColors", String.format("system_accent1_200=#%08x", getResources().getColor(android.R.color.system_accent1_200, null))); | |
| android.util.Log.i("MaterialColors", String.format("system_accent1_300=#%08x", getResources().getColor(android.R.color.system_accent1_300, null))); | |
| android.util.Log.i("MaterialColors", String.format("system_accent1_400=#%08x", getResources().getColor(android.R.color.system_accent1_400, 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
| // Command aftership-order-status extracts the full status information from an | |
| // aftership order-status webpage. | |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "errors" | |
| "math/bits" | |
| "os" |
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 lzstring | |
| import ( | |
| "errors" | |
| "math/bits" | |
| "unicode/utf8" | |
| "unsafe" | |
| ) | |
| // Decompress decompresses a lzstring-compressed byte sequence from a slice of |
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 decompress(buf) { | |
| const fromCharCode = String.fromCharCode | |
| const invalid = new Error("invalid") | |
| let idx = 0, u16 = 0, bit = 0 | |
| const uint = bits => { | |
| let res = 0 | |
| for (let i = 0; i < bits; i++) { | |
| if (bit == 0) { | |
| if (idx >= buf.length) { |
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 ( | |
| "bytes" | |
| "context" | |
| "errors" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log/slog" |
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 zyte | |
| import ( | |
| "bytes" | |
| "cmp" | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "maps" |
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 ( | |
| "context" | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "encoding/binary" | |
| "io" | |
| "log/slog" | |
| "net" |
NewerOlder