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
jakub-g / kibana scripted fields.md
Created Jun 25, 2019
kibana adhoc scripted field vs scripted field defined in panel
View kibana scripted fields.md

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
jakub-g / mkcert.sh
Created May 6, 2019
mkcert for npm's http-server
View mkcert.sh
mkcert -cert-file cert.pem -key-file key.pem "*.example.com"
@jakub-g
jakub-g / sendBeacon.md
Last active Jul 15, 2019
navigator.sendBeacon brain dump -- many not so great points
View sendBeacon.md

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
jakub-g / installing-old-firefox.md
Last active Apr 12, 2019
Installing old version of Firefox on Windows for testing and preventing it from self-updating
View installing-old-firefox.md
  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:

https://ftp.mozilla.org/pub/firefox/releases/63.0/win64/en-US/

  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
jakub-g / gist:a826368ac9ec5f82d32f9e2d93ea3a0f
Created Mar 14, 2019
vscode prevent watcher to keep a lock
View gist:a826368ac9ec5f82d32f9e2d93ea3a0f
open .vscode/settings.json
files.exclude
files.watcherExclude
search.exclude
https://code.visualstudio.com/docs/getstarted/settings
@jakub-g
jakub-g / language-locale-issues.md
Created Mar 7, 2019
Accept-language and other sniffings gone bad
@jakub-g
jakub-g / screen-sharing-best-practices.md
Last active Mar 6, 2019
Screen sharing best practices and tips
View screen-sharing-best-practices.md

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.

General

  • 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
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
jakub-g / differential-serving.md
Last active Jul 15, 2019
Differential serving (module nomodule)
View differential-serving.md

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
jakub-g / wpo-facts.md
Last active Mar 1, 2019
Web performance facts
View wpo-facts.md

A collection of web performance facts

Inspired by: https://wpostats.com/

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.