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/perl | |
use strict; | |
use LWP::UserAgent; | |
use HTTP::Request::Common qw(POST); | |
# リクエストの生成 | |
my $url = 'https://wlan-auth1.cc.tsukuba.ac.jp/login.html'; | |
my %formdata = ('buttonClicked' => '4','username' => 'YOUR_ID', 'password' => 'YOUR_PASSWORD'); | |
my $request = POST($url, [%formdata]); |
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/perl | |
# Cf. http://d.hatena.ne.jp/famnet/20100917/1284711061 | |
use strict; | |
use warnings; | |
use lib './lib'; | |
use LWP; | |
use LWP::ConnCache; | |
use Net::Twitter; |
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/ruby | |
# 言語仕様: http://wiki.keiyac.org/index.pl?page=Brainfsck | |
$KCODE = "UTF8" | |
$ptr = 0 | |
$tkn_ptr = 0 | |
$token = [] |
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/perl | |
use strict; | |
use warnings; | |
use Cwd; | |
# rmbf version 1.0.1 | |
# Remove backup files | |
# Written by Keiya CHINEN |
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
Win32::SerialPort_Configuration_File -- DO NOT EDIT -- | |
\\.\COM5 | |
CFG_1,none | |
eol,10 | |
clear,-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- | |
RCONST,0 | |
istrip,0 | |
CFG_2,none | |
XOFFCHAR,0 | |
PARITY_EN,0 |
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/perl | |
# | |
# by Keiya Chinen | |
use strict; | |
use warnings; | |
use WWW::YouTube::Download; | |
my $video_id = shift || die "Usage: $0 [video_id|video_url]"; |
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
// thx tomy! http://www5.airnet.ne.jp/tomy/cpro/sslib12.htm | |
function cartesian2polar(x,y,z) { | |
var obj = new Object; | |
obj.r = Math.sqrt( x*x + y*y + z*z ); | |
if (x != 0.0) | |
obj.phi = Math.atan2( y, x ); | |
else { | |
if (y < 0.0) |
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 bitlyshorten(longurl) | |
local http = require('socket.http') | |
--please specify your account ID and API key | |
local r,c = http.request('http://api.bitly.com/shorten?login=YOUR_LOGINID&apiKey=YOUR_API_KEY&longUrl='..longurl) | |
local json = require('json') | |
local decjson = json.decode(r) | |
local shorturl | |
for k,v in pairs(decjson.results) do |
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
.data | |
.align 4 | |
res: .long 0,0,0,0,0,0,0,0,0,0,0 | |
.text | |
.globl main | |
main: | |
mov $0,%eax #; temporary | |
mov $0,%esi #; counter (n) | |
mov %eax,res(,%esi,4) #; res[n] = 0 |
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
.data | |
.align 4 | |
varx: .long 12 | |
vary: .long 3 | |
.text | |
.globl main | |
main: | |
mov (varx),%eax | |
mov (vary),%ebx |
OlderNewer