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
<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<script type="text/javascript"> | |
function yt_search(){ | |
var keyword=encodeURIComponent(document.getElementById("keyword").value); | |
var script=document.createElement("script"); | |
script.type="text/javascript"; | |
script.src="http://gdata.youtube.com/feeds/api/videos?" | |
+ "vq=" + keyword + "&alt=json-in-script&max-results=30&callback=yt_cb"; | |
var yt_view=document.getElementById("yt_view"); |
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/perl | |
# mini uploader ver.0.1 (2011-03-21) by yukioc | |
# Ver.0.1 2011-03-21 new. | |
use strict; | |
use warnings; | |
use POSIX 'strftime'; | |
use CGI; | |
use CGI::Carp 'fatalsToBrowser'; | |
use File::Basename 'basename'; | |
use HTML::Template; |
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
Options ExecCGI | |
AddHandler cgi-script .cgi | |
DirectoryIndex mini-memo.cgi |
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
<html> | |
<body> | |
<div id="view"><i>Now loading TEPCO power consumption graph</i></div> | |
<script> | |
var cbTepco; | |
function getTepco(id,day){ | |
var s=document.createElement("script"); | |
s.type="text/javascript"; | |
s.src="http://tepco-usage-api.appspot.com/"+day+".json?callback=cbTepco" | |
cbTepco=(function(id,day){ |
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
Options ExecCGI | |
AddHandler cgi-script .py | |
DirectoryIndex mini-bbs.py |
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 perl | |
use strict; | |
use warnings; | |
use Encode; | |
use Net::SMTP; | |
my $svn_rev=shift or die; | |
my $svn_dir=shift or die; | |
my $smtp_url='xxx.yyy.zzz'; |
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 perl | |
print "Content-Type: text/html\n\n"; | |
print "<html><body><table border='1'>"; | |
print "<tr><th>$_</th><td>$ENV{$_}</td></tr>" for (sort(keys(%ENV))); | |
print "</table></body></html>"; |
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
#include <stdio.h> | |
void main(){ | |
int i; | |
for(i=1;i<100;i++){ | |
if(printf("%s%s", | |
(i%3==0)?"Fizz":"", | |
(i%5==0)?"Buzz":"")==0){ | |
printf("%d",i); | |
} | |
puts(""); |
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
/* | |
$ gcc arg.c | |
$ ./a.out -f -s 10 --longflag --longparam=20 aaa | |
option f | |
option s with value 10 | |
option longflag | |
option longparam with value 20 | |
last option aaa | |
*/ | |
#include <stdio.h> |