Skip to content

Instantly share code, notes, and snippets.

Krzysztof Kowalczyk kjk

Block or report user

Report or block kjk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View faster_binary_tree.go
package main
import (
"flag"
"fmt"
"log"
"os"
"runtime/debug"
"runtime/pprof"
"strconv"
View log_notion_requests.js
const puppeteer = require("puppeteer");
let waitTime = 5 * 1000;
async function testAjax() {
const url = "https://www.notion.so/Test-page-all-c969c9455d7c4dd79c7f860f3ace6429"
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setRequestInterception(true);
// those we don't want to log because they are not important
@kjk
kjk / reflect_slice.go
Created Aug 31, 2018
How to create a reflect slice
View reflect_slice.go
package main
import (
"fmt"
"log"
"reflect"
)
type S struct {
N int
@kjk
kjk / cmd-git-log.go
Created Mar 21, 2019
Compare output of 2 git log --format=oneline commands to see commits unique in each branch
View cmd-git-log.go
package main
import (
"bytes"
"fmt"
"io/ioutil"
"strings"
)
/*
@kjk
kjk / fakemenu.c
Last active Oct 29, 2019
how to implement menu-like pop-up the right way in win32
View fakemenu.c
/*****************************************************************************
* Sample program to demonstrate how a program can display a
* popup window which does not deactivate its parent. This
* can be used for things like a magnifying glass window or
* a pseudo-menu.
*****************************************************************************/
#define STRICT
#include <windows.h>
#define COMPILE_MULTIMON_STUBS
View keybase.md

Keybase proof

I hereby claim:

  • I am kjk on github.
  • I am kjksf (https://keybase.io/kjksf) on keybase.
  • I have a public key ASAdCRkKmAhWMJJsU_q76BM_JyYK5-MZMrwrr6qTOk3WEwo

To claim this, I am signing this object:

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
You can’t perform that action at this time.