Skip to content

Instantly share code, notes, and snippets.

View mkvoya's full-sized avatar
😋
<=

Mingkai Dong mkvoya

😋
<=
View GitHub Profile
@mkvoya
mkvoya / test.el
Created August 3, 2022 07:54
Emacs XWidget on MacOS
(setq xwid (make-xwidget
'webkit
"Title"
200 ; width
300 ; height
nil ; args
"aaa"
nil))
(with-current-buffer "aaa"
From 226a60b70f94889d3672c91dd218d8386604c7fc Mon Sep 17 00:00:00 2001
From: Mingkai Dong <[email protected]>
Date: Fri, 24 Dec 2021 01:19:03 +0800
Subject: [PATCH 1/2] Expose ns_fullsize_content and ns_title_hidden
---
src/frame.c | 6 ++++++
src/frame.h | 6 ++++++
src/nsfns.m | 14 ++++++++++++++
src/nsterm.h | 6 ++++++
@mkvoya
mkvoya / dblatex.rb
Last active January 27, 2022 15:15 — forked from phracker/dblatex.rb
Updated dblatex install formula for Homebrew
require 'formula'
# INSTRUCTIONS FROM MK
# You can download the file and run `brew install ./dblatex.rb`
# BEFORE INSTALLING THIS FORMULA:
# 1.) Install MacTex or BasicTex from https://www.tug.org/mactex/
# 2.) Make yourself the owner of the tex installation directory:
# $ sudo chown -R "$(id -un):$(id -gn)" /usr/local/texlive
# 3.) Update tlmgr and install required packages
@mkvoya
mkvoya / MemSpeed.cpp
Created December 18, 2020 02:58 — forked from mmozeiko/MemSpeed.cpp
Memory copy benchmark
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <xmmintrin.h> // SSE
#include <immintrin.h> // AVX
#ifdef _WIN32
#include <intrin.h> // for __movsb, __movsd, __movsq
commit 2496d0d4a4d084f7f2c66790379edf2a2940aec0
Author: Abutalib Aghayev <[email protected]>
Date: Mon Feb 27 13:24:04 2017 -0500
ext4-lazy
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index fe1f50f..dcef4ba 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@mkvoya
mkvoya / vfork.c
Last active October 25, 2018 05:35
Interesting vfork test
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#define LOG(fmt, ...) printf("[%d] %s: " fmt, getpid(), __func__, ##__VA_ARGS__)
void do_exec()
{
char *prog = "/bin/echo";
char *newargv[] = { prog, "echo", "I am echo!", NULL };