Skip to content

Instantly share code, notes, and snippets.

Avatar

Krzysztof Kowalczyk kjk

View GitHub Profile
View chromedp_bug.go
package main
import (
"context"
"fmt"
"net/url"
"time"
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/chromedp"
@kjk
kjk / main.go
Last active Oct 30, 2019
test goldmark markdown
View main.go
package main
import (
"bytes"
"fmt"
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/extension"
)
func main() {
@kjk
kjk / sumatranotes.txt
Last active Oct 31, 2019
notes from sumatra mupdf upgrade
View sumatranotes.txt
fz_add_text => fz_add_text_span
removed symbols from libmupdf.def:
fz_analyze_text
fz_keep_transfer_function
fz_drop_transfer_function
fz_apply_transfer_function
fz_buffer_cat
fz_buffer_printf
fz_buffer_vprintf
View main.go
package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}
@kjk
kjk / main.txt
Last active Nov 3, 2019
presstige crash
View main.txt
crashing page: 797e50e47c5a4fe8a0dbf9f7828a6192
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: net/http/server.go:2927 +0x38e
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: created by net/http.(*Server).Serve
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: net/http/server.go:1915 +0x9e0
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: net/http.(*conn).serve(0xc000488500, 0xcb7180, 0xc001356600)
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: bufio/bufio.go:138 +0x4f
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: bufio.(*Reader).Peek(0xc0013640c0, 0x4, 0x1596aaa6edd3, 0x116af80, 0x0, 0x0, 0x116af80)
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: bufio/bufio.go:100 +0x103
Nov 02 13:30:38 ubuntu-s-2vcpu-4gb-nyc3-01 presstige[854]: bufio.(*Reader).fill(0xc0013640c0)
View porting sumatra.txt
"c:\Users\kjk\Desktop\sum test\tst.pdf" -extract-text -1
@kjk
kjk / main.go
Last active Nov 5, 2019
command line arguments
View main.go
// :run go run main.go -echo echo-arg additional arg
// :collection Essential Go
package main
import (
"flag"
"fmt"
"os"
)
@kjk
kjk / main.go
Created Nov 5, 2019
Serialize struct as JSON
View main.go
// collection: Essential Go
package main
import (
"encoding/json"
"fmt"
"log"
)
// :show start
@kjk
kjk / main.go
Created Nov 5, 2019
Parse JSON into a struct
View main.go
// :collection Essential Go
package main
import (
"encoding/json"
"fmt"
"log"
)
// :show start
View main.go
// :collection Essential Go
package main
import "fmt"
func main() {
// :show start
v := 5
// pv is a pointer to v