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 main.html
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="keywords" content="pdf, epub, mobi, chm, cbr, cbz, xps, djvu, reader, viewer" />
<meta name="description" content="Sumatra PDF reader and viewer for Windows" />
<title>Sumatra PDF Documentation</title>
<link rel="stylesheet" href="/sumatra.css" type="text/css" />
@kjk
kjk / main.diff
Created Feb 20, 2020
sumatra tab handling (made with https://codeeval.dev)
View main.diff
+++ b/src/SumatraStartup.cpp
@@ -488,7 +488,9 @@ static int RunMessageLoop() {
if (TranslateAccelerator(accHwnd, accTable, &msg)) {
continue;
}
-
+ if (IsDialogMessage(msg.hwnd, &msg)) {
+ continue;
+ }
TranslateMessage(&msg);
@kjk
kjk / main.html
Created Feb 11, 2020
sumatra crash preview with alpine.js (made with https://codeeval.dev)
View main.html
<!doctype html>
<httml>
<head>
<style>
html, body {
font-family: monospace;
font-size: 10pt;
}
</style>
<script>
@kjk
kjk / main.go
Created Feb 1, 2020
extract translations with regexp (made with https://codeeval.dev)
View main.go
package main
import (
"fmt"
"regexp"
)
var (
TRANSLATION_PATTERN = regexp.MustCompile(`\b_TRN?\("(.*?)"\)`)
)
@kjk
kjk / c_cpp_properties.json
Created Jan 21, 2020
vscode cpp intellisense settings (made with https://codeeval.dev)
View c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceRoot}/src",
"${workspaceRoot}/src/util",
"${workspaceRoot}/src/wingui"
],
"defines": [
@kjk
kjk / main.go
Last active Jan 20, 2020
Value vs. pointer receiver (made with https://codeeval.dev)
View main.go
// :collection Essential Go
package main
import (
"fmt"
)
// :show start
type Foo struct {
Str string
@kjk
kjk / main.go
Last active Jan 20, 2020
Value vs. pointer receiver (made with https://codeeval.dev)
View main.go
// :collection Essential Go
package main
import "fmt"
// :show start
type Person struct {
FirstName string
LastName string
}
@kjk
kjk / sumatra checkbox tree.txt
Created Dec 31, 2019
Sumatra checkbox in tree view (made with https://codeeval.dev)
View sumatra checkbox tree.txt
https://docs.microsoft.com/en-us/windows/win32/controls/tree-view-control-reference
https://docs.microsoft.com/en-us/windows/win32/controls/tree-view-controls#tree-view-image-lists
https://docs.microsoft.com/en-us/windows/win32/controls/tree-view-controls#tree-view-styles
https://docs.microsoft.com/en-us/windows/win32/controls/tree-view-control-window-styles
typedef struct tagTVITEMCHANGE {
NMHDR hdr;
UINT uChanged;
HTREEITEM hItem;
UINT uStateNew;
View main.txt
#if(WINVER >= 0x0601)
#define WM_GESTURE 0x0119
#define WM_GESTURENOTIFY 0x011A
#endif /* WINVER >= 0x0601 */
#if (_WIN32_WINNT >= 0x0600)
#define WM_MOUSEHWHEEL 0x020E
#endif
View main.cc
#include <cstdio>
void foo(int); // Prototype declaration of foo, seen by main
// Must specify return type, name, and argument list types
int main()
{
foo(2); // OK: foo is known, called even though its body is not yet defined
}
// Must match the prototype
You can’t perform that action at this time.