Skip to content

Instantly share code, notes, and snippets.

@thinkAmi
thinkAmi / eiji_to_mdict.py
Created February 3, 2024 13:30 — forked from k141303/eiji_to_mdict.py
英辞郎をMDict形式に変換します。
# -*- coding: utf-8 -*-
"""
英辞郎をMDict形式に変換します。
"""
from writemdict import MDictWriter, encrypt_key
import sys
import codecs
import re
@thinkAmi
thinkAmi / 0_README.md
Last active February 20, 2018 07:40
Raspberry Pi 2 + systemd + udevで、USBデバイス挿入時にサービスを起動する

Raspberry Pi 2 + systemd + udevで、USBデバイス挿入時にサービスを起動する

@thinkAmi
thinkAmi / server.rb
Created August 19, 2014 20:32
Windows7 + WEBrick + apcupsdで、UPSの状態をブラウザから確認する
# 起動
# C:\apcupsd\cgi>ruby server.rb
# アクセス
# http://localhost:10080/multimon.cgi
require 'webrick'
DOCUMENT_ROOT = 'C:/apcupsd/cgi'
@thinkAmi
thinkAmi / TwitterSingleUserAuth.cs
Last active August 29, 2015 14:04
Twitter Single-user Auth sample: Using DotNetOpenAuth and DynamicJson
// Console Applicatoin
// Add library using NuGet
// - DotNetOpenAuth OAuth 1.0(a) Consumer (byAndrew Amott)
// - DynamicJson (by neuecc)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@thinkAmi
thinkAmi / accdb_qeury.rb
Created July 4, 2014 19:52
Ruby + Sequelを使って、MS Accessの選択クエリからデータを取得する
require 'sequel'
# MS Accessの選択クエリ(AccdbQuery)のSQLビュー
# SELECT ID, 名前 AS Name, [コメント] AS Comment
# FROM 日本語サンプル;
def write(msg)
puts "\n"
puts '-' * 20
puts msg
@thinkAmi
thinkAmi / accdb_ja.rb
Last active February 20, 2018 07:40
Ruby + Sequelを使って、テーブル名やカラム名が日本語のMS Accessからデータを抽出する
require 'sequel'
def write(msg)
puts "\n"
puts '-' * 20
puts msg
puts '-' * 20
end
@thinkAmi
thinkAmi / sequel_to_ms_access.rb
Created June 6, 2014 21:37
Sequel: Connecting to Microsoft Access(*.accdb)
# Tested Environment
# Windows7 x64, MS Access2010/2013, sequel 4.11.0
# Gemfile
# source 'https://rubygems.org'
# gem 'sequel'
# gem 'ruby-odbc' # for ODBC
require 'sequel'
@thinkAmi
thinkAmi / skype_win32ole.rb
Created June 5, 2014 20:46
Windows + Skype + Ruby(win32ole) で、Skypeを操作するサンプル
# Tested Environment
# - Windows7 x64
# - Skype 6.16.0.105
#
# Thanks
# Sunitha/SkypeShell https://github.com/Sunitha/SkypeShell
require "win32ole"
@thinkAmi
thinkAmi / Gemfile
Created May 27, 2014 20:55
Ruby + serialport + Sinatra で、シリアルCOMポートから受信したデータを表示するサンプル
source 'https://rubygems.org'
gem 'sinatra'
gem 'sinatra-contrib'
gem 'thin'
gem 'serialport'
@thinkAmi
thinkAmi / Gemfile
Created May 25, 2014 20:14
ActriveLdapのサンプルコード
source 'https://rubygems.org'
gem 'activeldap'
gem 'net-ldap'