Skip to content

Instantly share code, notes, and snippets.

View futpib's full-sized avatar

futpib

View GitHub Profile
@futpib
futpib / ko-first-class-components-and-bindings.md
Created April 24, 2017 10:22
ko feature request: Components and bindings as values (instead of or with registration)

I often find myself in a need of a local, private or "anonymous" binding as well as component (much like in #1444).

Registration via ko.component.register(name, ...) and ko.bindingHandlers[name] = ... for such cases is cumbersome and requires careful naming (namespacing, name mangling) or symbols (#2172) to make sure the thing you register is private-enough.

@futpib
futpib / 0.README.md
Last active May 15, 2018 16:43 — forked from agentcooper/0.README.md
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

DEBUG|grep_regex::literal|grep-regex/src/literal.rs:58: literal prefixes detected: Literals { lits: [Complete(findme)], limit_size: 250, limit_class: 10 }
DEBUG|globset|globset/src/lib.rs:429: built glob set; 0 literals, 0 basenames, 8 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
DEBUG|globset|globset/src/lib.rs:429: built glob set; 0 literals, 0 basenames, 8 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
DEBUG|globset|globset/src/lib.rs:429: built glob set; 0 literals, 0 basenames, 8 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
DEBUG|globset|globset/src/lib.rs:429: built glob set; 0 literals, 0 basenames, 8 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
DEBUG|globset|globset/src/lib.rs:424: glob converted to regex: Glob { glob: "**/*", re: "(?-u)^(?:/?|.*/).*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([RecursivePrefix, ZeroOrMore]) }
DEBUG|globset
@futpib
futpib / gist:00054b766caf416f0f0ed1762e543846
Created July 16, 2019 19:55
Jenkins CSP for reg-viz reports
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'self' 'unsafe-eval' 'unsafe-inline' data: cdn.jsdelivr.net fonts.googleapis.com fonts.gstatic.com; img-src 'self' github.com;")
@futpib
futpib / ext2scan.c
Last active September 6, 2022 12:09 — forked from countingpine/ext2scan.c
ext2scan: scan for ext2/ext3/ext4 partitions
/* ext2scan:
* Scans an input stream, sector by sector, for something that looks like an ext{2,3,4} partition.
* It does this by looking for a magic WORD, 0xEF53, at a known offset into the sector.
* For random data, this will occur by chance around once per 32MB of data, so we also
* check whether the first two sectors are all zeros, which is commonly true for ext partitions.
*
* Compile with:
* gcc ./ext2scan.c -o ./ext2scan
*
* Example usage:
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Roman Geints",
"label": "Software Engineer",
"image": "https://gateway.ipfs.io/ipfs/bafybeihbbpna3d7objpybow2q4ip6rvygopn2tl37o4dqvud56iq7fdfr4/image",
"email": "[email protected]",
"summary": "Full-Stack Developer focused on Web but versed in things all over the place. Worked at companies big and small.",
"location": {
"city": "Tbilisi",