Skip to content

Instantly share code, notes, and snippets.

@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.cs
Created December 24, 2011 01:52
html実体参照なファイル名をリネームするC#
using System;
using System.Collections.Generic;
using System.Text;
//VisualStudioで実行する際、参照設定に"System.Web"を追加してください。
//ソリューションエクスプローラの参照設定を右クリック→参照の追加→".NET"のタブ→"System.Web"→"OK"
namespace rename_file
{
class Program
{
@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"
#!/use/bin/env ruby
require 'cgi'
require 'json'
json = JSON.parse(CGI.new["json"])
x,y = IO.pipe
print "Content-Type: text/plain\n\n"
json["events"].each do |e|
system'yaourt', '-Ss', e["messege"]["text"], out: x
@raa0121
raa0121 / log
Created May 16, 2012 09:47
BCDice例外
ThreadError
thread 0x270c1f8 tried to join itself
rubygems.rb:840:in `synchronize'
rubygems.rb:840:in `searcher'
rubygems/custom_require.rb:34:in `require'
rubygems/config_file.rb:220:in `load_file'
rubygems/config_file.rb:168:in `initialize'
rubygems.rb:385:in `new'