Skip to content

Instantly share code, notes, and snippets.

jakub-g jakub-g

Block or report user

Report or block jakub-g

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jakub-g / kibana scripted
Created Jun 25, 2019
kibana adhoc scripted field vs scripted field defined in panel
View kibana scripted

scripted field

if (!doc['data.request_response_time'].empty) {
  return doc['data.request_response_time'].value + doc['data.response_to_boot_start_time'].value + doc['data.boot_def_time'].value + doc['data.dmp_call_time'].value + doc['data.dmp_create_time'].value

return null
jakub-g /
Created May 6, 2019
mkcert for npm's http-server
mkcert -cert-file cert.pem -key-file key.pem "*"
jakub-g /
Last active Jul 15, 2019
navigator.sendBeacon brain dump -- many not so great points

navigator.sendBeacon(url, data)

The data parameter is an ArrayBufferView, Blob, DOMString, or FormData object containing the data to be transmitted.

  • no plain old key-value JS object :| serialization of an object to a string up to the developer

  • always POST, not possible to send GET :|

  • when DOMString passed, the request type is Content-Type: text/plain, hence expressjs middlewares that read postdata won't process it :/ need to write custom middleware

jakub-g /
Last active Apr 12, 2019
Installing old version of Firefox on Windows for testing and preventing it from self-updating
  1. Grab old version of Firefox from Mozilla's FTP. They downloads are placed in folders that follow a simple naming convention. For example v63.0 is here:

  1. Run the installer and install it to a folder like c:\software\firefox63

  2. IMPORTANT: turn off internet connectivity at system level before running Firefox for the first time! Otherwise it will automatically self-update! (Windows 10 has "airplane mode").

  3. Create a shortcut with special command line switches

jakub-g / gist:a826368ac9ec5f82d32f9e2d93ea3a0f
Created Mar 14, 2019
vscode prevent watcher to keep a lock
View gist:a826368ac9ec5f82d32f9e2d93ea3a0f
open .vscode/settings.json
jakub-g /
Created Mar 7, 2019
Accept-language and other sniffings gone bad
jakub-g /
Last active Mar 6, 2019
Screen sharing best practices and tips

When sharing your screen -- during an on-site presentation, a remote meeting presentation, a conference talk -- there are a lot of small things to consider to make the experience better for the viewers. It's paramount to accommodate for the fact that your viewers will perceive things differently from youself due to where they are and their individual predispositions.


  • Make sure your pointer is visible to the users (or accommodate for it if impossible).

    • For example, when sharing mobile screens, people don't see where your finger is. Demos which rely on you tapping the device in places invisible to the observers are bad. Accommodate for that by telling upfront where are you going to tap.
    • When using tools like Vysor, prefer clicking things on your laptop with your mouse, instead of directly tapping with your finger on the device.
  • Make sure people in the room and the ones connected remotely *c

jakub-g / gist:39d0649bb86aac5c4f9996cd7fda1a2c
Last active Mar 6, 2019
High contrast light theme for Conemu
View gist:39d0649bb86aac5c4f9996cd7fda1a2c
ConEmu theme: Solarized Light + 8. = #dddddd
cat ~/.gitconfig
[color "diff"]
new = bold black bold green
old = bold black bold red
jakub-g /
Last active Jul 15, 2019
Differential serving (module nomodule)

Rationale for serving ES6

  • Write ES6 without transpilation (perf reasons aside; developer convenience)
  • Perf reasons (untranspiled code is smaller and faster)

Expectations vs reality

jakub-g /
Last active Mar 1, 2019
Web performance facts

A collection of web performance facts

Inspired by:

Mobile vs WiFi

  • 2018.11 OpenSignal study:
    • mobile vs wifi:
      • In 33 countries, or 41% of those analyzed by OpenSignal, mobile delivers a faster download experience than Wifi
    • 4G vs wifi:
You can’t perform that action at this time.