Skip to content

Instantly share code, notes, and snippets.

@hanya
hanya / generate_dictionary.patch
Last active April 1, 2019 08:02
Haikuports recipe for Mozc UT2
diff --git a/generate-dictionary.sh b/generate-dictionary.sh
index 2d1e45b..719c628 100755
--- a/mozcdic-ut2-20171008/generate-dictionary.sh
+++ b/mozcdic-ut2-20171008/generate-dictionary.sh
@@ -2,6 +2,8 @@
MOZCVER="2.20.2677.102"
DICVER="20171008"
+TOPDIR=../..
+MOZCDIR=$TOPDIR/sources/mozc
@hanya
hanya / generate_dictionary.patch
Last active April 1, 2019 08:02
Haikuports recipe for Mozc NEologd UT
diff --git a/generate-dictionary.sh b/generate-dictionary.sh
index d60a741..20f3ee7 100755
--- a/mozcdic-neologd-ut-20190204.1/generate-dictionary.sh
+++ b/mozcdic-neologd-ut-20190204.1/generate-dictionary.sh
@@ -3,23 +3,24 @@
MOZCVER="2.23.2815.102"
DICVER="20190204"
REVISION="1"
-
+TOPDIR=../..
@hanya
hanya / ricty_diminished-3.2.3.recipe
Last active February 14, 2019 14:48
HaikuPorts recipe for RictyDiminished font
SUMMARY="Ricty Diminished font"
DESCRIPTION="Ricty Diminished font is designed for text editing \
based on Inconsolata and Circle M+ 1m fonts."
HOMEPAGE="https://www.rs.tus.ac.jp/yyusa/ricty_diminished.html"
COPYRIGHT="2012-2014 Yasunori Yusa
2006-2015 Raph Levien"
LICENSE="SIL Open Font License v1.1"
REVISION="1"
SOURCE_URI="https://github.com/edihbrandon/RictyDiminished/archive/3.2.3.tar.gz"
CHECKSUM_SHA256="4569555415e6b04c6cddc4cd715c7c91aae9ffc2ce5c0ea37d7bd40a5161ac0a"
@hanya
hanya / JP_108-key
Created February 3, 2019 13:55
Japanese 108 keys layout for Haiku OS
name = JP 108
# Place in /boot/home/config/non-packaged/data/KeyboardLayouts
# Size shortcuts
default-size = 10,10
$b = 5,10
$c = 20,10
$d = 15,10
$e = l15,20,11
@hanya
hanya / HHKB_JP
Created February 3, 2019 13:54
HHKB_JP layout for Haiku OS
name = HHKB JP
# Place in /boot/home/config/non-packaged/data/KeyboardLayouts
# Size shortcuts
default-size = 10,10
$b = 5,10
$c = 20,10
$d = 15,10
$e = l15,20,11
@hanya
hanya / HHKB
Created February 3, 2019 13:53
HHKB layout for Haiku OS
name = HHKB
# Place in /boot/home/config/non-packaged/data/KeyboardLayouts
# Size shortcuts
default-size = 10,10
$b = 5,10
$c = 18,10
$d = 15,10
$enter = d22,10
@hanya
hanya / README.md
Last active September 18, 2017 13:21
Customize text size and line width of KiCAD modules

Customize text size and line width of KiCAD modules

If you think official footprint modules have small text size or thin lines for drawings, you can change them with this script at once.

You need https://github.com/adamgreig/agg-kicad/blob/master/scripts/sexp.py file to execute this script. Obtain it and put it into the same directory with the customize_mods.py file.

Here is list of options can be specified.

@hanya
hanya / copy_catkeys.py
Created June 13, 2017 14:54
Copies translated entries and merge with new en.catkeys for Haiku catkeys
 import argparse
class Catkeys:
def __init__(self, path):
self.path = path
with open(path, "r") as f:
lines = f.readlines()
if not lines:
raise Exception('no data: ' + path)
data = {}
@hanya
hanya / logger.cc
Created May 20, 2017 15:48
logger application to take some message and write into standard output on Haiku OS
// Compile as follows:
// g++ logger.cc -lbe -o logger
#include <Application.h>
#include <iostream>
#include <string.h>
#define LOGGER "application/x-vnd.Logger"
enum {
@hanya
hanya / README.md
Last active March 19, 2017 16:25
Converts outline file between hierarchical text and OPML

Outline conversion script

Converts outline file between hierarchical text and OPML. This python script works with only Python3.

Here is list of options can be specified.

python3 olconv.py -h
usage: olconv [-h] [--version] [--char CHAR] [-f F] [-o O] [-i {hier,opml}]
 [-x {hier,opml}] [--title TITLE] [--text TEXT]