Skip to content

Instantly share code, notes, and snippets.

View okhiroyuki's full-sized avatar

Hiroyuki Okada okhiroyuki

View GitHub Profile
@okhiroyuki
okhiroyuki / config.ini
Last active August 29, 2015 14:11
グローバルIPを取得してGoogleSpreadsheetsに書き出す ref: http://qiita.com/okhiroyuki/items/86546211dc68cf6c75dc
[google]
username = ****
password = ****
spreadsheet_key = *****(スプレッドシートID)
@okhiroyuki
okhiroyuki / myntx.py
Created December 21, 2014 22:26
ntx-python使って、NTX制御(声でロケット発射、スイッチでモーター制御)
#!/usr/bin/env python
import nxt.locator
from nxt.motor import *
from nxt.sensor import *
import time
FORTH = 100
BACK = -100
@okhiroyuki
okhiroyuki / .bash_profile
Last active August 29, 2015 14:15
Linux-dotfiles
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/usr/lib/ruby/gems/1.8
@okhiroyuki
okhiroyuki / powershell_here.reg
Created February 28, 2015 06:29
Open Powershell Here
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\powershell_here]
@="Open PowerShell Here"
[HKEY_CLASSES_ROOT\Directory\shell\powershell_here\command]
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell_here]
@="Open PowerShell Here"
@okhiroyuki
okhiroyuki / ImportCSVtoExcel.rb
Created March 31, 2010 01:14
Import CSV Data to Excel
#! ruby -Ks
require "exlap"
filename2 = "template.xls"
path = "./hoge"
a_path = Dir.entries(path)
xl = Exlap.new
@okhiroyuki
okhiroyuki / AllPrintExcel.rb
Created March 31, 2010 01:19
The file of all the Excel that exists in a certain folder is printed.
#! ruby -Ks
require 'win32ole'
xl = WIN32OLE.new('Excel.Application')
xl.DisplayAlerts = false
xl.Visible = true
# フォルダ名を指定
foldername = "buf"
@okhiroyuki
okhiroyuki / nettime.bat
Created May 28, 2010 02:03
基準となるローカルパソコンの時間と同期させる
net time \\***.***.***.*** /set /yes
@okhiroyuki
okhiroyuki / AutoPatchWork
Created May 28, 2010 01:59
windows chrome setting
.autopagerize_page_separator_blocks .autopagerize_link:before{
content:"page: " attr(number);
}
.autopagerize_page_separator_blocks .autopagerize_link:hover:before{
content:"";
}
.autopagerize_page_separator_blocks .autopagerize_link:hover:after{
content:attr(href);
}
.autopagerize_page_separator{
@okhiroyuki
okhiroyuki / battery_check.vbs
Created May 28, 2010 02:09
Windows PC の電源供給状況をメール監視
Dim b_bool
Dim oMsg
Dim filename
Dim strNum
Dim message
strComputer = "."
filename = "status.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
@okhiroyuki
okhiroyuki / gist:810675
Created February 4, 2011 03:03
EXCELのグラフで指定している参照先を一括変換する
Sub ReplaceGraphFormula()
'
' グラフ参照先一括変換
'
Dim hoge As String
Dim gnum, str1, str2 As String
str1 = "L10" 'ターゲットの文字列
str2 = "L5" '置換後の文字列