Skip to content

Instantly share code, notes, and snippets.

@raa0121
raa0121 / README.txt
Created October 18, 2011 17:31
ニコ生アラート(本家)のAPIを叩いて、入ってるコミュニティの生放送をTwitterにPostするRubyBot
#=================================================================================
#【アプリ名】 ニコ生アラート(本家)のAPIを用いたTwitterBot
#【著作権者】 raa0121
#【対応環境】
# Linux Mac
# gem install twitter_oauth
# gem install mechanize
# 後は ruby nicolivealert.rb で起動が可能です。
#【開発環境】 Cygwin (WindowsVista SP2 32bit)
#【開発言語】 Ruby(1.9.2-p180)(DL元:http://www.artonx.org/data/asr/ )
@raa0121
raa0121 / hachima_and_zin_filter.user.js
Created October 27, 2011 11:02
はちまと刃を弾くフィルタ for Greasemonkey
// ==UserScript==
// @name hachima_and_zin_filter
// @namespace raa0121
// @description hachima_and_zin_filter
// @include http://jin115.com/*
// @include http://blog.esuteru.com/*
// ==/UserScript==
(function() {
var bodys = document.getElementsByTagName("body");
@raa0121
raa0121 / test1.java
Created November 4, 2011 07:20
JavaTest
//すごく適当に書いてるので、適宜読み替えてね!
//多分こんな感じだと思う
//class testはメソッドや変数の定義を作っておくところ
class test1{
int A(){
B();
}
int B(){
}
@raa0121
raa0121 / Skype.vba
Created November 6, 2011 09:18
Skypeのマルチログインスクリプト
Option Explicit
Dim objWshShell
Set objWshShell = WScript.CreateObject("WScript.Shell")
objWshShell.Run """C:\Program Files\Skype\Phone\Skype.exe"" /secondary /username: /password: /nosplash /minimized"
Set objWshShell = Nothing
@raa0121
raa0121 / sake.cpp
Created November 10, 2011 19:12
酒が飲めるプログラミング
//http://twitter.com/hotwatermorning/status/134626644336967682
for(int i = 1; i <= 12; ++i) { std::cout << i << "月はC++で酒が飲めるぞー!酒が飲める飲めるぞー!酒が飲めるぞー!♪" << std::endl; }
@raa0121
raa0121 / main.log
Created November 23, 2011 14:50
sudo port install ruby19 の log (iBook G4 の Tiger)
version:1
:debug:main epoch: in tree: 0 installed: 0
:debug:main libiconv 1.14_0 exists in the ports tree
:debug:main libiconv 1.14_0 is the latest installed
:debug:main libiconv 1.14_0 is active
:debug:main Merging existing variants '' into variants
:debug:main new fully merged portvariants:
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/textproc/libiconv
:debug:main OS darwin/8.11.0 (Mac OS X 10.4) arch powerpc
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
@raa0121
raa0121 / Makefile
Created November 27, 2011 10:12
sourceとbinaryの分離
#binnaryfileとsourcefileを分ける構造でのMakefile
#(ディレクトリ)/src な状況で使う
SOURCE_DIR := src
vpath %.c $(SOURCE_DIR)
$1:$1.c
gcc -o $@ $<
@raa0121
raa0121 / error.json
Created November 28, 2011 23:16
DodontoFServer.rbのError
{"result":"#<Mysql::ClientError::ServerGoneError: The MySQL server has gone away>$@ :
/srv/http/DodontoF/src_ruby/mysql/protocol.rb:622:in `rescue in write'
/srv/http/DodontoF/src_ruby/mysql/protocol.rb:600:in `write'
/srv/http/DodontoF/src_ruby/mysql/protocol.rb:274:in `query_command'
/srv/http/DodontoF/src_ruby/mysql.rb:336:in `query'
DodontoFServerMySql.rb:109:in `executeSql'
DodontoFServerMySql.rb:425:in `isExistTable?'
DodontoFServerMySql.rb:450:in `isExistDir?'
DodontoFServerMySql.rb:525:in `isExistDir?'
DodontoFServerMySql.rb:687:in `isExistDir?'
@raa0121
raa0121 / gist:1426139
Created December 3, 2011 05:13
VimShellのError
function vimshell#execute_current_line..vimshell#mappings#execute_line..<SNR>91_execute_command_line..vimshell#parser#check_script の処理中にエラーが検出されました:
行 3:
E117: 未知の関数です: vimproc#parser#split_statements
E15: 無効な式です: vimproc#parser#split_statements(a:script)
@raa0121
raa0121 / rename_file.rb
Created December 24, 2011 00:45
html実体参照なファイル名をリネームするスプリクト for win
#!/use/bin/ruby -Ks
#codeing:sjis
require 'rubygems'
require 'htmlentities'
def printDirs(dir)
Dir::entries(dir).sort.each do |child|
path = dir + "/" + child;
if child == "." or child == ".."
# do nothing
elsif File::ftype(path) == "directory"