Skip to content

Instantly share code, notes, and snippets.

View JekRock's full-sized avatar

Yevhen Badorov JekRock

  • Ukraine
View GitHub Profile
@JekRock
JekRock / userChrome.css
Created April 2, 2022 13:06
Firefox hide tabs bar
#TabsToolbar > .toolbar-items,
#TabsToolbar > .titlebar-spacer{ visibility: hidden }
#nav-bar{ margin-top: -43px;padding: 1px 140px 2px 3px !important; }
@JekRock
JekRock / countLines.go
Created May 4, 2023 08:35
Fast line counter in Go
// source https://stackoverflow.com/questions/24562942/golang-how-do-i-determine-the-number-of-lines-in-a-file-efficiently
func lineCounter(r io.Reader) (int, error) {
buf := make([]byte, 32*1024)
count := 0
lineSep := []byte{'\n'}
for {
c, err := r.Read(buf)
count += bytes.Count(buf[:c], lineSep)
@JekRock
JekRock / pom.xml
Created August 10, 2023 08:29
Java build jar with dependencies using maven
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>test-project</artifactId>
<version>1.0</version>
@JekRock
JekRock / code.txt
Created November 18, 2023 07:38
Telegram code formatting
```javascript
// code is here
```
@JekRock
JekRock / jwt-decode.sh
Created March 19, 2025 14:21
jwt-decode
# https://www.pgrs.net/2022/06/02/simple-command-line-function-to-decode-jwts/
jwt-decode() {
jq -R 'split(".") |.[0:2] | map(gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=") | @base64d) | map(fromjson)' <<< $1
}