Skip to content

Instantly share code, notes, and snippets.

Avatar
⌨️
Keyboard operator

Raitis Stengrevics daGrevis

⌨️
Keyboard operator
View GitHub Profile
View gist:d2d5a92c0f3e541e2581c1c5915fd21e
const x = [1, 2, 3]
x.reduce((n, acc) => {
if (n > 2) {
return acc
}
return acc + n
}, 0)
View init.vim
nnoremap <Tab> :CocCommand explorer<CR>
call coc#config('explorer', {
\ 'sources': [{'name': 'file', 'expand': 1}],
\ 'file.columns': ['git', 'indent', 'icon', 'filename', 'size', 'readonly'],
\ 'file.showHiddenFiles': 1,
\ 'width': 60,
\ 'icon.enableNerdfont': 1,
\ 'keyMappings.<tab>': 'quit',
\ 'keyMappings.<cr>': 'expandOrShrink'
View test.go
package main
import (
"encoding/hex"
"fmt"
)
func main() {
var md5, err = hex.DecodeString("7f94dd413148ff9ac9e9e4b6ff2b6ca9")
if err != nil {
View test.go
package main
import "fmt"
func main() {
var md5 = []byte("7f94dd413148ff9ac9e9e4b6ff2b6ca9")
fmt.Println(len(md5))
}
View test.go
package main
import "fmt"
func main() {
var md5 = "7f94dd413148ff9ac9e9e4b6ff2b6ca9"
fmt.Println(len(md5))
}
View state.ts
export type MapToBlocValue<T extends {}> = {
[K in keyof T]: T[K] extends BlocSelect<any> ? T[K]['value'] : MapToBlocValue<T[K]>
}
View big-type.ts
interface PathArray<T, L> extends Array<string | number> {
['0']?: keyof T
['1']?: L extends {
['0']: infer K0
}
? K0 extends keyof T
? keyof T[K0]
: never
: never
['2']?: L extends {
View gist:1f4844aa31add4900feb72ecb231fff2
nick | c
----------+-------
Aleksejs | 54188
daGrevis | 32604
ij | 25946
dianshi | 23906
snowball | 22033
zn | 20907
jurgenzz | 13936
emilsp | 11013
View gist:b68dff5820ef7db4aeebf5ea9dfdac99
nick | c
----------+------
dianshi | 2292
Aleksejs | 1438
daGrevis | 1100
snowball | 694
zn | 662
siers | 556
vdk | 303
emilsp | 287
View gist:465f14a1d8b6c40648b4d2f0699e057d
nick | c
----------+-------
Aleksejs | 54188
daGrevis | 32604
ij | 25946
dianshi | 23906
snowball | 22033
zn | 20907
jurgenzz | 13936
emilsp | 11013