Skip to content

Instantly share code, notes, and snippets.

View futpib's full-sized avatar

futpib

View GitHub Profile
{
"$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",
@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:
@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;")
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 / 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

@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.

bash -x ./build.sh -p
+ source_root=src
+ build_root=build
+ do_build=true
+ do_pack=false
+ do_svg=true
+ main -p
++ getopt -o hcips:b: -l help,clean-only,keep-icons,pack,source-dir:,build-dir: -- -p
+ args=' -p --'
+ eval set -- ' -p --'
@futpib
futpib / bimap.coffee
Last active August 29, 2015 14:13
Bidirectional map in CoffeeScript (on top of Harmony Map)
class WrappedMap
# We need a wrapper because you can't just extends Map:
# TypeError: Method Map.prototype.set called on incompatible receiver #<BiMap>
constructor: ->
@_map = new Map arguments...
# clone and wrap Map.prototype properties
Object.getOwnPropertyNames(Map::).forEach (name) =>
desc = Object.getOwnPropertyDescriptor Map::, name
magic: policeman_ruleset
version: 0.1
id: "https_half_open_sandbox"
l10n:
en-US:
name: "HTTPS sandbox"
description: "Reject non-HTTPS requests from HTTPS pages"
magic: policeman_ruleset
version: 0.1
id: "allow_styles_same_site"
l10n:
en-US:
name: "Allow styles from same and same second-level domain"
description: ""