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 perl | |
=pod | |
perl fetch_movie_score.pl 1 100|sort -nrk3 -t $'\t' | |
みたいな感じの使い方を想定 | |
=cut | |
use strict; | |
use warnings; | |
use Try::Tiny; | |
use Carp; | |
use LWP::Simple; |
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
var casper = require("casper").create({ | |
viewportSize: { width: 1024, height: 768 } | |
}); | |
casper.userAgent("Mozilla/5.0"); | |
casper.start("https://honto.jp/reg/login.html", function(){ | |
this.echo("ログイン画面"); | |
this.fill('#pbBlock33398 > form', { dy_lginId: '<MAIL ADDRESS>', dy_pw: '<PASSWORD>' }, true); | |
}); |
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
SELECT GROUP_CONCAT(COLUMN_NAME separator ' ') FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA="[DATABASE_NAME]" and TABLE_NAME=[TABLE_NAME]; |
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
perl -MEncode -i -nle 'Encode::from_to($_,"utf8","cp932");print $_¥r¥n' [FILE] | |
# -MオプションでEncodeモジュールを指定 | |
# -iオプションで一時ファイルを作るよう指定 | |
# -nで引数のファイルを展開して一行ずつ実行 | |
# -lオプションで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
phantom = require 'phantom' | |
cheerio = require 'cheerio' | |
if process.argv.length <= 2 | |
console.log "coin type error!" | |
process.exit() | |
coin = process.argv[2] | |
unless coin in ['btc','ltc', 'doge'] | |
console.log "coin type error!" |
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
cronJob = require('cron').CronJob | |
to_json = require('xmljson').to_json | |
request = require 'request' | |
module.exports = (robot) -> | |
new cronJob '00 30 09,12,15,18 * * 1-5', () => | |
url = "http://b.hatena.ne.jp/hotentry/it.rss" | |
options = | |
url: url | |
timeout: 2000 | |
headers: {'user-agent': 'node title fetcher'} |