Skip to content

Instantly share code, notes, and snippets.


Krzysztof Kowalczyk kjk

View GitHub Profile
kjk / main.go
Created Oct 20, 2021
gomarkdown test (made with
View main.go
package main
import (
func main() {
extensions := parser.CommonExtensions | parser.AutoHeadingIDs
kjk / main.diff
Last active Oct 20, 2021
and description (made with
View main.diff
+this is a diff
-and there it is
kjk /
Last active Oct 19, 2021
vercel "api" url bug (made with

Update: this bugs seems to be fixed.

Vercel has a bug that if you put "api" anywhere in the URL, it triggers some internal Vercel 404 error.

I discovered it on my website because I had valid page with "api" in the url and it returned internal Vercel error page instead of rendering 404.html

It happens on any website hosted on Vercel.


kjk / main.js
Last active Oct 19, 2021
pdf.js usage (made with
View main.js
var pdfjsLib = require('pdfjs-dist/build/pdf');
var PdfjsWorker = require('worker-loader!pdfjs-dist/build/pdf.worker.js');
import {
} from 'pdfjs-dist/web/pdf_viewer.js';
View main.go
// :glot
package main
import "fmt"
func main() {
// :show start
var s string // empty string ""
s1 := "string\nliteral\nwith\tescape characters\n"
s2 := `raw string literal
kjk / fakemenu.c
Last active Sep 24, 2021
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>
kjk / 3.5-chromium.txt
Last active Sep 20, 2021
clang-format styles
View 3.5-chromium.txt
kjkmacpro:sumatrapdf kjk$ clang-format -dump-config -style=Chromium
Language: Cpp
# BasedOnStyle: Chromium
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
kjk / main.txt
Created Jul 16, 2021
scratchpad.txt (made with
View main.txt
C:\Users\kjk\AppData\Local\Temp\sumE1DD.tmp -copy-self-to "C:\Users\kjk\src\sumatrapdf\out\dbg64\SumatraPDF.exe"
kjk / main.go
Created Jun 22, 2021
pretty print JSON (made with
View main.go
package main
import (
var prettyOpts = pretty.Options{
Width: 80,
#include <iostream>
int main()
int x = 1;
if (x > 0) {
std::cout << "x (" << x << ") is greater than zero\n";