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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss"/> | |
<link rel="shortcut icon" href="{Favicon}"> | |
<link type="text/css" rel="stylesheet" media="screen" href="http://libelabo.jp/stylesheets/screen.css"/> | |
<title>{Title}</title> | |
<style type="text/css"> |
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 'net/http' | |
require 'cgi' | |
Net::HTTP.version_1_2 | |
module TinyURL | |
module_function | |
# Makes a URL short via TinyURL.com. | |
# returned value is the key of TinyURL.com. |
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
class Integer | |
def toshigo? | |
# return nil if self <= 0 | |
s = self.to_s | |
l = s.length | |
return false if l % 2 != 0 | |
((s[0...(l/2)].to_i) - (s[(l/2)..-1].to_i)).abs == 1 | |
end |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<!-- DEFAULT COLORS --> | |
<meta name="color:Background" content="#fff"/> | |
<meta name="color:Title" content="#444"/> | |
<meta name="color:Description" content="#777"/> | |
<meta name="color:Post Title" content="#6498cc"/> | |
<meta name="color:Text" content="#444"/> |
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
#!/usr/bin/env ruby1.9 | |
# -*- coding: utf-8 -*- | |
def URLencode(str) | |
str.force_encoding("binary").gsub(/\W+/){ |x| x.unpack("C*").map{ |y| sprintf("%%%02X", y) }.join } | |
end | |
puts URLencode("ほげ") |
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
# $TWPOKE / $TWPOKE2 には、Twitterへ発言を投稿するスクリプトの名前が格納されている | |
# == Last train information | |
15 16 * * 1 $TWPOKE '[まもなく最終列車] 南斜里駅(釧網本線) 網走方面最終 16:19 [auto]' > /dev/null 2>&1 | |
5 15 * * 2 $TWPOKE '[まもなく最終列車] 上幌延駅(宗谷本線) 稚内方面最終 15:09 [auto]' > /dev/null 2>&1 | |
40 16 * * 3 $TWPOKE '[まもなく最終列車] 東山駅(函館本線) 函館方面最終 16:46 [auto]' > /dev/null 2>&1 | |
40 16 * * 4 $TWPOKE '[まもなく最終列車] 羽帯駅(根室本線) 帯広方面最終 16:48 [auto]' > /dev/null 2>&1 | |
0 7 * * 5 $TWPOKE '[まもなく最終列車] 上白滝駅(石北本線) 網走方面最終 07:04 [auto]' > /dev/null 2>&1 | |
45 16 * * 6 $TWPOKE '[まもなく最終列車] 真布駅(留萌本線) 深川方面最終 16:52 [auto]' > /dev/null 2>&1 | |
20 16 * * 7 $TWPOKE '[まもなく最終列車] 知内駅(津軽海峡線) 青森方面最終 16:27 [auto]' > /dev/null 2>&1 | |
# == First train information |
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
#!/bin/sh | |
find -regex '.+~' -print -delete |
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
// Windowsのコンソールプログラムを、コンソールを表示させずに実行するためのプログラム。 | |
// > cmdrun.exe hogepiyo.bat | |
// のように利用する。 | |
// | |
// VC++2003 + Windows Vista SP1で動作確認済み | |
// | |
// (C)2009 H.Hiro(Maraigue) http://hhiro.net/about/ | |
// 利用条件: CC-BY-2.1-JA | |
// (http://creativecommons.org/licenses/by/2.1/jp/) | |
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
@echo off | |
rem Info from http://ykr414.com/dos/dos05.html | |
echo %PATH% | |
setlocal | |
set PATH=HOGEPIYO | |
echo %PATH% | |
endlocal | |
echo %PATH% |
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
#!/usr/bin/env ruby | |
# ミク画像 "kabochamiku-src.png" | |
# (http://f.hatena.ne.jp/maraigue/20081012211841)を、 | |
# かぼちゃミク | |
# (http://f.hatena.ne.jp/maraigue/20081221032946)に | |
# するコード。 | |
# | |
# RMagickが必要 | |
# |
OlderNewer