Skip to content

Instantly share code, notes, and snippets.

thinkAmi thinkAmi

Block or report user

Report or block thinkAmi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thinkAmi
thinkAmi / 0_README.md
Last active Feb 20, 2018
Raspberry Pi 2 + systemd + udevで、USBデバイス挿入時にサービスを起動する
View 0_README.md

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

@thinkAmi
thinkAmi / server.rb
Created Aug 19, 2014
Windows7 + WEBrick + apcupsdで、UPSの状態をブラウザから確認する
View server.rb
# 起動
# C:\apcupsd\cgi>ruby server.rb
# アクセス
# http://localhost:10080/multimon.cgi
require 'webrick'
DOCUMENT_ROOT = 'C:/apcupsd/cgi'
@thinkAmi
thinkAmi / TwitterSingleUserAuth.cs
Last active Aug 29, 2015
Twitter Single-user Auth sample: Using DotNetOpenAuth and DynamicJson
View TwitterSingleUserAuth.cs
// 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 Jul 4, 2014
Ruby + Sequelを使って、MS Accessの選択クエリからデータを取得する
View accdb_qeury.rb
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 Feb 20, 2018
Ruby + Sequelを使って、テーブル名やカラム名が日本語のMS Accessからデータを抽出する
View accdb_ja.rb
require 'sequel'
def write(msg)
puts "\n"
puts '-' * 20
puts msg
puts '-' * 20
end
@thinkAmi
thinkAmi / sequel_to_ms_access.rb
Created Jun 6, 2014
Sequel: Connecting to Microsoft Access(*.accdb)
View sequel_to_ms_access.rb
# 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 Jun 5, 2014
Windows + Skype + Ruby(win32ole) で、Skypeを操作するサンプル
View skype_win32ole.rb
# 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
Ruby + serialport + Sinatra で、シリアルCOMポートから受信したデータを表示するサンプル
View Gemfile
source 'https://rubygems.org'
gem 'sinatra'
gem 'sinatra-contrib'
gem 'thin'
gem 'serialport'
@thinkAmi
thinkAmi / Gemfile
Created May 25, 2014
ActriveLdapのサンプルコード
View Gemfile
source 'https://rubygems.org'
gem 'activeldap'
gem 'net-ldap'
@thinkAmi
thinkAmi / linq2twitter_sample.cs
Created Apr 25, 2014
LINQToTwitterライブラリで、ツイートしたり、ツイートを取得するサンプル (WPFでTextBoxとButtonを使ってます)
View linq2twitter_sample.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
You can’t perform that action at this time.