Skip to content

Instantly share code, notes, and snippets.

View kofuk's full-sized avatar
🍈
Eating melonpan

Koki Fukuda kofuk

🍈
Eating melonpan
View GitHub Profile
# fzf-tab-completion を読む
シェルの補完を fzf で選べるようになる不思議なやつ。
Bash を使っているので、Bash 実装であるこれ
https://github.com/lincheney/fzf-tab-completion/blob/f6f83c88eca0fc07f7820dd8bb6c7ea75ef478c5/bash/fzf-bash-completion.sh
を読む
## 前提知識
@kofuk
kofuk / build.sh
Last active September 20, 2022 03:36
Build LLVM 15 on CentOS 7
#!/usr/bin/env bash
set -eu
_build_dir="${HOME}/build"
_build_dir_small=/dev/shm
_build_dir_medium=/tmp
PREFIX="${HOME}/.local"
function build_gmp() {
cd "${_build_dir_small}"
%%
%% This is file `gnuplottex.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% gnuplottex.dtx (with options: `package')
%%
%% Copyright (c) 2006-13, Lars Kotthoff <lars@larsko.org> and contributors
%%
[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
GenericName=Web Browser
GenericName[ar]=متصفح ويب
GenericName[ast]=Restolador Web
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[ca]=Navegador web
GenericName[cs]=Webový prohlížeč
GenericName[da]=Webbrowser
@kofuk
kofuk / obs-pipewire-backport.diff
Created May 8, 2021 07:34
Patch to the trunk to linux-caputre.so to work with latest release.
diff -u '--color=auto' -r obs-studio-3514f4fea5ead7aa15f1e57934a86a55b579fed0/plugins/linux-capture/linux-capture.c obs-studio/plugins/linux-capture/linux-capture.c
--- obs-studio-3514f4fea5ead7aa15f1e57934a86a55b579fed0/plugins/linux-capture/linux-capture.c 2021-05-07 05:58:14.000000000 +0900
+++ obs-studio/plugins/linux-capture/linux-capture.c 2021-05-08 15:51:04.547014308 +0900
@@ -26,11 +26,11 @@
MODULE_EXPORT const char *obs_module_description(void)
{
#ifdef ENABLE_PIPEWIRE
- if (obs_get_nix_platform() != OBS_NIX_PLATFORM_X11_GLX)
+// if (obs_get_nix_platform() != OBS_NIX_PLATFORM_X11_GLX)
return "PipeWire based window/screen capture for X11 and Wayland";
#include <stdio.h>
#define OP_ADD -1 // '+'
#define OP_SUB -2 // '-'
#define OP_MUL -3 // '*'
#define OP_DIV -4 // '/'
char op[] = {'+', '-', '*', '/'};
int stack[1024];
@kofuk
kofuk / mc_20w45a.tsv
Created November 16, 2020 09:50
Minecraft snapshot 20w45a newly-added blocks.
block_id r g b a
minecraft:amethyst_block 64 47 9e ff
minecraft:amethyst_cluster 64 47 9e aa
minecraft:black_candle 00 00 00 78
minecraft:black_candle_cake 30 30 30 ff
minecraft:blue_candle 59 82 ce 78
minecraft:blue_candle_cake 89 b2 ff ff
minecraft:brown_candle aa 6d 41 78
minecraft:brown_candle_cake da 9d 71 ff
minecraft:budding_amethyst 64 47 9e ff

Keybase proof

I hereby claim:

  • I am kofuk on github.
  • I am fukuda (https://keybase.io/fukuda) on keybase.
  • I have a public key whose fingerprint is 4946 BC1E 39F9 A2DB 8B22 27BE 4D18 928A D324 F5EA

To claim this, I am signing this object:

--- src/xfns.c.orig 2020-08-02 01:13:44.793716250 +0900
+++ src/xfns.c 2020-08-02 01:09:34.189729711 +0900
@@ -2533,6 +2533,8 @@
static XIMStyle
best_xim_style (XIMStyles *xim)
{
+ if (!xim) return XIMPreeditNothing | XIMStatusNothing;
+
int i, j;
int nr_supported = ARRAYELTS (supported_xim_styles);
@kofuk
kofuk / zlib-export-target.patch
Last active July 21, 2020 02:11
Patch for zlib to generate zlib-config.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fe939d..6ae92ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,6 +187,8 @@ add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
set_target_properties(zlib PROPERTIES SOVERSION 1)
+set_target_properties(zlib zlibstatic PROPERTIES
+ PUBLIC_HEADER "${ZLIB_PUBLIC_HDRS}" )