Skip to content

Instantly share code, notes, and snippets.

Avatar

Nozomi Miyamori nm004

  • Japan
View GitHub Profile
View 41-microsoft.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<alias>
<family>Verdana</family>
<accept>
<family>Liberation Sans</family>
</accept>
</alias>
@nm004
nm004 / cargo
Last active September 24, 2022 00:25
View cargo
#!/bin/sh
real_this=$(realpath "$0")
root=$(realpath -m "$real_this/../..")
prog=$root/cargo/bin/$(basename "$0")
export PATH=$root/usr/bin:$PATH
exec "$prog" "$@"
View discord.desktop.patch
--- a/Discord/discord.desktop 2022-08-09 02:04:47.000000000 +0900
+++ b/Discord/discord.desktop 2022-08-29 20:21:34.116822663 +0900
@@ -3,7 +3,7 @@
StartupWMClass=discord
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
GenericName=Internet Messenger
-Exec=/usr/share/discord/Discord
+Exec=Discord
Icon=discord
Type=Application
View 21-nohint-for-cjk.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<description>Disable hinting for CJK fonts</description>
<!--
FreeType2 hinting does not work well for CJK fonts,
so we disable hinting for them.
-->
<match target="font">
<test name="lang" compare="contains">
@nm004
nm004 / calcoptimalsize.jl
Last active July 30, 2022 22:03
create tempdecal.wad from image (old projects)
View calcoptimalsize.jl
# This software is in the public domain
function calcoptimalsize(w, h)
I = 16:16:512
W = repeat(I, length(I)) |> x -> reshape(x, length(I), length(I)) |> rot180
H = W'
A = W.*H
B = A.÷4
C = B.÷4
D = C.÷4
View strtohex.py
#
# strtohex - Read hex string from command line and write bytes to stdout
#
# This software is in the public domain
#
import os, sys
os.write(1, b''.join( bytes.fromhex(s) for s in sys.argv[1:] ))
View bind-iconv-home.windows31j.service
[Unit]
Description=Bind mount home.windows31j directory
Documentation=man:bindfs(1)
[Service]
ExecStart=%h/Apps/bindfs/usr/bin/bindfs \
-f \
--no-allow-other \
-o modules=iconv \
-o to_code=WINDOWS-31J \
View 60-mic-mono.conf
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
filter.graph = {
nodes = [
{
type = builtin
name = mixer
label = mixer
control = { "Gain 1" = 2 }
View .bashrc
alias e='toolbox enter'
alias o='gio open'
alias ja='LANG=ja_JP.UTF-8'
alias make='make -j$(nproc)'
stty -ixon
@nm004
nm004 / strtolh.c
Last active July 16, 2022 08:38
strtolh - convert hex string arguments to byte representations
View strtolh.c
/*
* strtolh - read hex strings from command line and write bytes to stdout.
*
* This software is in the public domain.
*/
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char **argv)