This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="2.6" jmeter="2.11 r1554548"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="テスト計画" enabled="true"> | |
<stringProp name="TestPlan.comments"></stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | |
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="ユーザー定義変数" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> |
This file contains 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
require "mechanize" | |
require "yaml" | |
# 設定ファイル | |
config = YAML.load_file("config.yml") | |
# スクレイピング準備 | |
agent = Mechanize.new | |
agent.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36" | |
agent.max_history = 1 |
This file contains 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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="user-scalable=no width=200px initial-scale=0.7" > | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | |
<title>Slide Puzzle</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script> | |
<style> | |
.grid { |
This file contains 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
(function() { | |
/////////////////////////////////////// | |
// モデル定義 | |
/////////////////////////////////////// | |
// タスクモデル | |
var Task = Backbone.Model.extend({ | |
defaults: { | |
title: 'do something', | |
completed: false |
This file contains 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
asin_id = "[アソシエイトID]"; | |
a = document.getElementsByTagName("a"); | |
for (var i = 0; i < a.length; i++) { | |
var url = a[i].href; | |
var res = url.indexOf("http://www.amazon.co.jp/gp/product/"); | |
if (res !== -1) { | |
var asin = url.split("/")[5] | |
a[i].href = "http://www.amazon.co.jp/o/ASIN/" + asin + "/" + asin_id; | |
} | |
} |
This file contains 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
/* | |
* メルマガ、堀江貴文のブログでは言えない話よりスケジュールを抜き出し | |
* Google Calendarに登録する。 | |
*/ | |
var CALENDAR_NAME = 'ホリエモンのメディアスケジュール'; | |
var SEARCH_QUERY = '堀江貴文のブログでは言えない話 3/'; | |
var PUNCTUATION_HEADER = '■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■'; | |
var SCHEDULE_HEADER = '今週のメディアスケジュール'; | |
var PARTS_OF_SCHEDULE_HEADER = '◆◇'; | |
var PARTS_OF_SCHEDULE_FOOTER = '------------------------------'; |
This file contains 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
// google画像検索結果からオリジナル画像URLを抜いてくる | |
var dis = document.getElementsByClassName("rg_di"); | |
var img_urls = []; | |
for (var i=0; i<dis.length; i++) { | |
var href = dis[i].children[0].href; | |
var reg = /imgurl=[^&]*/; | |
var img_url_str = reg.exec(href)[0]; | |
img_urls[i] = img_url_str.replace("imgurl=", ""); | |
} |
This file contains 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
require 'openssl' | |
# 暗号化 | |
def encrypt(in_file) | |
in_filename = File::basename(in_file, '.txt') | |
out_file = open(in_filename + "_encrypted" + ".txt", "w") | |
File::open(in_file, "r") {|f| | |
f.each do |line| | |
str = line.chomp! |
This file contains 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 "mysql" | |
INSERT_COUNT = 1000000; | |
HOSTNAME = 'localhost' | |
USERNAME = 'username' | |
PASSWORD = 'password' | |
DATABASE = 'database' | |
PORT = 3306 |
This file contains 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
javascript:(function(){ | |
var last_day = parseInt(G_lastd); | |
var str = ""; | |
for (var i=1; i<=last_day; i++) { | |
str = str + G_mm; | |
str = str + "/"; | |
str = str + document.getElementById('day' + i).innerText; | |
str = str + "("; | |
str = str + document.getElementById('week' + i).innerText; | |
str = str + ")%E3%80%80"; |