Skip to content

Instantly share code, notes, and snippets.

View kovetskiy's full-sized avatar
🏊

Egor Kovetskiy kovetskiy

🏊
View GitHub Profile
set nohud
set nosmoothscroll
set noautofocus
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
let completionengines = ["google", "amazon", "imdb", "dogpile"]
let mapleader = ","
@kovetskiy
kovetskiy / gist:0b0c28d2b79de5129ceb
Created December 9, 2014 12:52
urxvt configure
--enable-256-color --enable-font-styles --enable-unicode3
["<Return>", "i"] : Inspect (focus) message
["I"] : Open the message in new tab
["<Space>"] : Scroll message or select next unread one
["t"] : Select thread
["d", "<Del>"] : Move mail to Trash folder
["j", "<Right>"] : Select next message
["gj"] : Select next message, including closed threads
["J", "<Tab>"] : Select next unread message
["k", "<Left>"] : Select previous message
["gk"] : Select previous message
@kovetskiy
kovetskiy / gist:1e8b931b029f4fa5d633
Created September 11, 2015 06:27
golang handling panic
package main
import (
"log"
"net/http"
"sync"
)
type Handler struct{}
@kovetskiy
kovetskiy / .go
Created September 11, 2015 06:31
package main
import (
"log"
"net/http"
)
type Handler struct{}
func (handler Handler) ServeHTTP(
1494574706.613978 server started (13549): version 2.4, socket /tmp/tmux-1000/test, protocol 8
1494574706.614127 on Linux 4.10.11-1-ARCH #1 SMP PREEMPT Tue Apr 18 08:39:42 CEST 2017; libevent 2.0.22-stable (poll)
1494574706.617361 add peer 0x7dc290: 8 (0x7dbaa0)
1494574706.617432 new client 0x7dbaa0
1494574706.617496 loading /etc/tmux.conf
1494574706.617538 loading /dev/null
1494574706.617618 server loop enter
1494574706.623461 peer 0x7dc290 message 100
1494574706.623524 client 0x7dbaa0 IDENTIFY_FLAGS 0x10000
sudo systemctl stop kafka; sudo rm -rf /var/lib/kafka/my-topic-0; sudo systemctl start kafka; AMOUNT=20000 THREADS=5 CYCLES=10 go run main.go
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
2018/07/18 15:02:47 dial tcp [::1]:9092: connect: connection refused
var apm = require('elastic-apm-node').start()
var http = require('http')
var process = require('process')
function sleep(time) {
var stop = new Date().getTime();
while(new Date().getTime() < stop + time) {
;
}
}
package hookstest
import (
"fmt"
)
// ShouldPass prints a message that this function passes any code linter
func ShouldPass() {
fmt.Println("This code should pass any linter")
}
package hookstest
import (
"fmt"
)
func ShouldNotPass() {
fmt.Printf(
"This code should not pass linting because it has broken message formatting: %s\n",
)