Skip to content

Instantly share code, notes, and snippets.

Avatar
🦛
Do not underestimate hippopotamus

Iku Iwasa iquiw

🦛
Do not underestimate hippopotamus
View GitHub Profile
@iquiw
iquiw / patch-jansson-option.diff
Last active Aug 22, 2020
Patches for editors/emacs27
View patch-jansson-option.diff
diff --git a/editors/emacs27/options.mk b/editors/emacs27/options.mk
index a0e8f6d05e4e..7b254d356d72 100644
--- a/editors/emacs27/options.mk
+++ b/editors/emacs27/options.mk
@@ -2,7 +2,7 @@
### Set options
PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
-PKG_SUPPORTED_OPTIONS= dbus gconf gnutls imagemagick svg xaw3d xft2 xml
+PKG_SUPPORTED_OPTIONS= dbus gconf gnutls imagemagick jansson svg xaw3d xft2 xml
View diag-wrapper.sh
#!/bin/sh
set -e
TMPOUT=$(mktemp /tmp/diag.XXXXXX)
trap 'rm "$TMPOUT"' 0 1 2 3 15
"/usr/bin/$1" -a -o "$TMPOUT" /dev/stdin
cat "$TMPOUT"
@iquiw
iquiw / udsuid.c
Created Dec 31, 2019
UID of unix domain socket
View udsuid.c
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <err.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
const char SOCK_PATH[] = "/tmp/foo-socket";
View aspell-0.60.7.diff
diff --git a/textproc/aspell/Makefile b/textproc/aspell/Makefile
index 363af60b883..594b76f3889 100644
--- a/textproc/aspell/Makefile
+++ b/textproc/aspell/Makefile
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.72 2019/08/11 13:23:21 wiz Exp $
#
-DISTNAME= aspell-0.60.6.1
-PKGREVISION= 10
View ms932-woe.txt
WAVE DASH (U+301C, "〜")
FULLWIDTH TILDE (U+FF5E, "~")
CENT SIGN (U+00A2, "¢")
FULLWIDTH CENT SIGN (U+FFE0, "¢")
POUND SIGN (U+00A3, "£")
FULLWIDTH POUND SIGN (U+FFE1, "£")
NOT SIGN (U+00AC, "¬")
View apt-check-updates.py
#! /usr/bin/python3
import apt
import apt_pkg
import json
import requests
import subprocess
webhook_url = '<WEBHOOK_URL>'
channel = '<CHANNEL>'
@iquiw
iquiw / redmine-fixed-header-hack.css
Created Oct 1, 2017
Fixed header for Redmine minimalflat2 theme
View redmine-fixed-header-hack.css
@media screen and (min-width: 900px) {
#top-menu, #header {
position: fixed;
width: 100%;
z-index: 9999;
}
#header {
top: 22px;
}
@iquiw
iquiw / warp-test.log
Created Aug 30, 2015
Warp test on NetBSD
View warp-test.log
warp-3.1.3: test (suite: doctest)
Examples: 12 Tried: 12 Errors: 0 Failures: 0
warp-3.1.3: test (suite: spec)
BufferPool
withBufferPool
does not clobber buffers
Conduit
conduit
IsolatedBSSource
@iquiw
iquiw / ums.c.diff
Created Aug 2, 2015
Support upper 2 buttons of Kensington SlimBlade
View ums.c.diff
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index 4d7745b..eb6f095 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -334,6 +334,12 @@ ums_attach(device_t parent, device_t self, void *aux)
}
}
}
+ for (size_t j = 1; i <= MAX_BUTTONS && j <= 2; i++, j++) {
+ if (!hid_locate(desc, size, HID_USAGE2(HUP_MICROSOFT, j),
@iquiw
iquiw / getdocker.sh
Last active Sep 10, 2016
Script to download docker.exe
View getdocker.sh
#! /bin/sh
bundleURL=https://raw.githubusercontent.com/docker/toolbox/master/Dockerfile.windows
dockerBucket=get.docker.com
if [ -e docker ]; then
echo 'File or directory "docker" should not exist.'
exit 1
fi