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
kjk / asan crash in SHGetFileInfo.txt
Last active Dec 7, 2019
msvc asasn crash in SHGetFileInfoW (made with
View asan crash in SHGetFileInfo.txt
This happened on Win 10. Testing x32 asan build of SumatraPDf.
==10996==ERROR: AddressSanitizer: attempting to call malloc_usable_size() for pointer which is not owned: 0x028f04f8
#0 0x11e502e in __asan_wrap_HeapSize D:\agent\_work\6\s\src\vctools\crt\asan\llvm\compiler-rt\lib\asan\
#1 0x7629e31b in msize+0x2b (C:\WINDOWS\System32\ucrtbase.dll+0x1002e31b)
#2 0x7629e7d1 in register_onexit_function+0x231 (C:\WINDOWS\System32\ucrtbase.dll+0x1002e7d1)
#3 0x7629e68d in register_onexit_function+0xed (C:\WINDOWS\System32\ucrtbase.dll+0x1002e68d)
#4 0x7629e61c in register_onexit_function+0x7c (C:\WINDOWS\System32\ucrtbase.dll+0x1002e61c)
#5 0x7629c30f in o__register_onexit_function+0x6f (C:\WINDOWS\System32\ucrtbase.dll+0x1002c30f)
#6 0x7629c2af in o__register_onexit_function+0xf (C:\WINDOWS\System32\ucrtbase.dll+0x1002c2af)
kjk / filesize.js
Created Nov 29, 2019
human-readable file size in JavaScript (made with
View filesize.js
* filesize
* @method filesize
* @param {Mixed} arg String, Int or Float to transform
* @param {Object} descriptor [Optional] Flags
* @return {String} Readable file size String
function filesize (arg, descriptor = {}) {
View main.go
package main
import (
func main() {
#include <iostream>
// function declaration
int add2(int i);
// functin overloading: same name but different arguments
int add2(int i, int j);
// default arguments: i is optional, if not given will be 0
int add3(int i = 0);
// function defintion
kjk / main.txt
Created Nov 20, 2019
description (made with
View main.txt
TextColor = #5f4b32
BackgroundColor = #fbf0d9
View strtotime.go
package main
import (
func main() {
kjk / pupdl.js
Created Nov 17, 2019
puppeteer download page (made with
View pupdl.js
'use strict';
const puppeteer = require('puppeteer');
const fs = require('fs');
(async function main() {
try {
const browser = await puppeteer.launch();
const [page] = await browser.pages();
kjk / main.go
Last active Nov 10, 2019
trimEmptyLinesFromEnd (made with
View main.go
package main
import (
func trimEmptyLinesFromEnd(a []string) []string {
for len(a) > 0 {
lastIdx := len(a) - 1
View index.js
let v;
v = 5;
v = "str";
View index.js
const logMe = function(s) {
const logMe2 = logMe;
You can’t perform that action at this time.