This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function query_string($query) { | |
return implode("", mysql_fetch_assoc(mysql_query($query))); | |
} | |
$starttime = microtime(true); | |
$db = mysql_connect("localhost", "hagehage", "hogehoge"); | |
mysql_query("SET names utf8"); | |
mysql_query("USE tiarra"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
riaju = ["リア充", "おめでとうございます", "死", "地震", "ご冥福", "を", "お祈りします", "原発", "炉心溶融", "プルサーマル", "爆発事象", "ただちに", "人体", "影響はない", "ご結婚", "リア充", "復興支援", "本当に", "おせち", "!", "祝", "そして"] | |
pluthermal = 100 | |
omedetougozaimasu = riaju.sort_by{rand} | |
shi = omedetougozaimasu[rand(omedetougozaimasu.length)] | |
touhokuchihoutaiheiyouokijishin = "" | |
genpatsu = "ご結婚おめでとうございます" | |
while genpatsu.length <= pluthermal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
Session.pre_send_message_timeline_status do |sender, e| | |
e.text = e.text.gsub(/\n/, " ") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
# | |
# itochan IRCbot script | |
# thanks: http://www.olnr.org/~omote/blog/ | |
$LOAD_PATH << "lib" | |
$LOAD_PATH << "../lib" | |
require "rubygems" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
class CGI | |
@@accept_charset="UTF-8" unless defined?(@@accept_charset) | |
# URL-encode a string. | |
# url_encoded_string = CGI::escape("'Stop!' said Fred") | |
# # => "%27Stop%21%27+said+Fred" | |
def CGI::escape(string) | |
string.gsub(/([^ a-zA-Z0-9_.-]+)/) do | |
'%' + $1.unpack('H2' * $1.bytesize).join('%').upcase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require "benchmark" | |
case ARGV[0].to_i | |
# 既存の(ruby 1.9.2p180)cgi | |
when 0 then require "cgi/util" | |
# このパッチを適用したcgi | |
when 1 then require "./ruby/lib/cgi/util" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "active_record" | |
require "pp" | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'mysql2', | |
:host => 'ito315.com', | |
:username => 'root', | |
:password => 'foobar', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
time = Time.now | |
require "nokogiri" | |
require "open-uri" | |
require "active_record" | |
ActiveRecord::Base.establish_connection( | |
:adapter => "mysql", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
「セキュリティ&プログラミングキャンプ2011」プログラミングコース | |
プログラミング言語クラス 応募用紙 | |
氏 名(ふりがな) | |
城 一統(じょう かずのり) | |
性別 ■男 □女 | |
生年月日および現在の年齢 西暦 1997年 3月 15日生まれ | |
現在(14)才 | |
所 属(杉並区立和田中学校 3年) | |
住 所 〒166-00xx 東京都杉並区xxx | |
電話番号(昼間に連絡できる電話番号) 03-xxxx-xxxx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.zsh_history | |
HISTSIZE=100000 | |
SAVEHIST=100000 | |
#bindkey -v | |
# End of lines configured by zsh-newuser-install | |
export LANG=ja_JP.UTF-8 | |
export GIT_SSL_NO_VERIFY=true | |
export TERM=xterm-256color |