Skip to content

Instantly share code, notes, and snippets.

View dhlavaty's full-sized avatar

Dusan Hlavaty dhlavaty

View GitHub Profile
@dhlavaty
dhlavaty / group-and-count-eslint.md
Created May 25, 2021 13:11
Group and count eslint warnings
yarn run eslint | grep -o "warning.*$" | sed -e's/  */ /g' | sort | uniq -c | sort 
@dhlavaty
dhlavaty / Mac pfctl Port Forwarding.md
Created April 13, 2021 13:42
Mac pfctl Port Forwarding

Mac pfctl Port Forwarding

Forward Port 80 and 443 with Mac pfctl Port Forwarding

echo "
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
" | sudo pfctl -ef -
@dhlavaty
dhlavaty / readme.md
Last active March 10, 2020 11:03
Výpredaj gadgetov

Výpredaj gadgetov

Apple Magic Mouse

apple

  • Bluetooth
  • na 2x AA batérie

Cena: 15,- Euro

@dhlavaty
dhlavaty / appscript.json
Last active January 1, 2023 00:27
Allows to make simple unauthenticated read-only GET requests to Google Spreadsheet
{
"timeZone": "Europe/Paris",
"dependencies": {
"enabledAdvancedServices": [{
"userSymbol": "Sheets",
"serviceId": "sheets",
"version": "v4"
}]
},
"webapp": {
@dhlavaty
dhlavaty / opencv-windows-installing-howto.md
Created June 10, 2019 08:54
OpenCV prototyping notes
@dhlavaty
dhlavaty / fingera-bookmarklet.md
Created September 20, 2018 08:32
Fingera.com - better report bookmarklet

Fingera - better report bookmarklet

Create a new bookmark somewhere in your browser with the following URL:

javascript:(function(){ var last = ''; var color = 'transparent'; $('#list_table_body tr').each(function (index, el) { var actual = $(el).children(":first").text(); if (actual !== last) { color = (color === 'transparent') ? '#eee':'transparent'; } last=actual; $(el).css('background-color', color); }); })(); 
@dhlavaty
dhlavaty / electrum-tails.md
Last active June 27, 2018 07:17
Installing Electrum-LTC LiteCoin wallet in Tails Live operating system

Installing Electrum-LTC LiteCoin wallet in Tails LiveCD operating system

Tested with Tails 3.8 LiveCD (no persistent storage needed, you have to install it after every reboot) and Electrum-LTC 3.1.3.1.

Changelog (of this document)

2018-06-27

  • updated to Tails 3.8

2018-04-20

@dhlavaty
dhlavaty / ramdisk-howto.md
Last active April 24, 2023 15:35
Create RAM disk in macOS High Sierra (10.13.3)

Create RAM disk in macOS High Sierra (10.13.3), macOS Monterey (12.6.5) with ARM processor

Update 2023-04-24

Tested on macOS Monterey (12.6.5) with Apple M1 Pro chip (ARM architecture)

LIST DISKS

@dhlavaty
dhlavaty / go-lang-factorization-tests-multithreaded.go
Last active October 23, 2017 13:22
Factorization test in golang
package main
import (
"fmt"
"math/big"
"sync"
)
func runInThread(wg *sync.WaitGroup, startFrom int64, numOfIterations int64) {
defer wg.Done()
@dhlavaty
dhlavaty / color-difference-calulation.scss
Created May 30, 2017 11:25
SASS color difference calculations
// Use https://www.sassmeister.com/ to try it out
$have: #dfe2e5;
$need: #e1e4e6;
//$need: #d8dbe1;
//$out: saturate(darken($have, 2.15), 2.7);
$out: desaturate(lighten($have, 0.58), 1.25);