Skip to content

Instantly share code, notes, and snippets.

View miurahr's full-sized avatar

Hiroshi Miura miurahr

View GitHub Profile
@gildor
gildor / build.gradle.kts
Last active January 28, 2022 12:03
Protobuf Gradle Plugin + Kotlin DSL
import com.google.protobuf.gradle.protobuf
import com.google.protobuf.gradle.protoc
plugins {
java
idea
id("com.google.protobuf") version "0.8.7"
}
repositories {

PDIC/Unicodeの辞書型式

PDIC/Unicodeの辞書(拡張子が.dicのやつ)の仕様を簡単に解説します。
ある程度プログラムの知識は要るかもしれませんが、バイナリファイルとかを普段扱わない人でも読めるように配慮しようと思います。

本家資料はこちらです
一部分かりやすさのために、本家資料の用語と違う言いかたをしているところがあります。

ここで対象にするのは辞書のバージョンが6.10のものです。PDIC/Unicode Ver.5以降で使われているようです。

anonymous
anonymous / gist:7073320
Created October 20, 2013 18:26
Install ibus-setup-mozc-jp.desktop for Ubuntu 13.10
cat > ibus-setup-mozc-jp.desktop << EOF
[Desktop Entry]
Name=IBus Mozc Setup
Comment=Set up IBus Mozc engine
Exec=/usr/lib/mozc/mozc_tool --mode=config_dialog
Icon=production
NoDisplay=true
Type=Application
StartupNotify=true
EOF
@ChrisLundquist
ChrisLundquist / elasticsearch.coffee
Created November 10, 2012 11:04
elasticsearch plugin for Hubot
# Description:
# Log all the things to ElasticSearch then lets you ask hubot what you missed
#
# Dependencies:
# None
#
# Configuration:
# ELASTICSEARCH_HOSTNAME - E.G. elasticsearch.example.com:9200, where to send the put requests
# ELASTICSEARCH_USERNAME - OPTIONAL basic auth username
# ELASTICSEARCH_PASSWORD - OPTIONAL basic auth password
@Gab-km
Gab-km / github-flow.ja.md
Last active February 23, 2026 01:59 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@miurahr
miurahr / 0001-wininet-disable-TLS1.1-1.2-by-default.patch
Created August 19, 2012 12:13
A patch to behave same as windows that support only SSLv3/TLSv1.0 on WINE. Evernote fails to connect when TLSv1.2 or 1.1 requested.
From dfb1d62bcfbc70ff22c126b4ddd835eff739ebde Mon Sep 17 00:00:00 2001
From: Hiroshi Miura <miurahr@linux.com>
Date: Tue, 21 Aug 2012 23:32:55 +0900
Subject: [PATCH 1/2] wininet: disable TLS1.1/1.2 by default
OpenSSL 1.0.x now support TLSv1.1 and TLSv1.2 but Windows7 is disabled by default.
It looks Schannel registry whether enables TLSv1.1/1.2.
It fixes error connecting Evernote server with evernote client.
http://bugs.winehq.org/show_bug.cgi?id=30598
@miurahr
miurahr / wine-openssl-force-tlsv1.patch
Created May 2, 2012 13:15
A patch to support only TLSv1 on WINE. intend to escaping openssl issue on Ubuntu 12.04(LTS) that is caused by openssl 1.x.x cut off negotiation data length. Some application such as evernote fails sync.
--- wine1.4-1.4/dlls/wininet/netconnection.c.keep 2012-03-08 01:11:48.000000000 +0900
+++ wine1.4-1.4/dlls/wininet/netconnection.c 2012-05-02 22:12:36.003843393 +0900
@@ -124,6 +124,7 @@
MAKE_FUNCPTR(SSL_library_init);
MAKE_FUNCPTR(SSL_load_error_strings);
MAKE_FUNCPTR(SSLv23_method);
+MAKE_FUNCPTR(TLSv1_method);
MAKE_FUNCPTR(SSL_CTX_free);
MAKE_FUNCPTR(SSL_CTX_new);
MAKE_FUNCPTR(SSL_new);
@hiboma
hiboma / nginx.conf
Created January 24, 2012 13:02
Nginx+Lua+Redis で動的upstream
worker_processes 1;
error_log /dev/stderr debug;
events {
worker_connections 256;
}
http {
server {
@rawsyntax
rawsyntax / rsync-retry.sh
Created October 26, 2011 20:20 — forked from jmar71n/rsync-retry.sh
Runs rsync, retrying on errors up to a maximum number of tries.
#!/bin/bash
### ABOUT: See: http://gist.github.com/366269
### Runs rsync, retrying on errors up to a maximum number of tries.
### On failure script waits for internect connection to come back up by pinging google.com before continuing.
###
### Usage: $ ./rsync-retry.sh source destination
### Example: $ ./rsync-retry.sh user@server.example.com:~/* ~/destination/path/
###
### INPORTANT:
@hokaccha
hokaccha / gist:58594
Created February 5, 2009 07:26
wordbreak.js for jQuery
$(function(){
var $targetElement = '.wordBreak';
if($.browser.msie) {
$($targetElement).css('word-break', 'break-all');
} else {
$($targetElement).each(function(){
if(navigator.userAgent.indexOf('Firefox/2') != -1) {
$(this).html($(this).text().split('').join('<wbr />'));
} else {
$(this).html($(this).text().split('').join(String.fromCharCode(8203)));