Skip to content

Instantly share code, notes, and snippets.

javascript:(function(){els = document.getElementsByTagName('div');for(var i in els){ str = els[i].innerHTML; els[i].innerHTML = str.replace('T','<b>TT</b>'); }})()
@kyokutyo
kyokutyo / xhtml-template.html
Created March 13, 2009 03:35
XHTML 1.0 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="xxxxx,xxxxx" />
<meta name="description" content="xxxxx" />
<title>xxxxx</title>
<link rel="stylesheet" href="./skin/style.css" type="text/css" media="screen" />
#!/perl/bin/perl
use strict;
use warnings;
use XML::TreePP;
my $tpp = XML::TreePP->new();
my $tree = $tpp->parsehttp( GET => "http://news.livedoor.com/topics/rss.xml" );
my $file = "/home/username/.opera/mail/signature.txt";
ls -R | grep -c '.htm'
/*
* Depends:
* jquery.js
*/
$(document).ready(function (){
jQuery.each(jQuery.browser, function (i, val){
if(i=="msie" && val && jQuery.browser.version<7) {
$("img[src$='.png']").each(function (){
this.src = this.src.replace('png','gif');
javascript:void(window.open(document.location.href.replace('.kyokutyo','')))
@kyokutyo
kyokutyo / gist:198236
Created September 30, 2009 17:03
jquery.papapa.js
(function() {
jQuery.fn.papapa = function(config) {
config = jQuery.extend({
interval : 100,
color : ["#00c","#090","#f00"]
}, config);
var target = this;
var defColor = $(this).css("color");
var l,i;
#!/usr/bin/env perl
use strict;
use warnings;
use Net::Twitter;
my $account = 'kyokutyo';
my $nt = Net::Twitter->new(traits => [qw/API::REST/]);
eval {
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="xxxxx,xxxxx" />
<meta name="description" content="xxxxx" />
<title>xxxxx</title>
<link rel="stylesheet" href="./skin/style.css" type="text/css" media="screen,print" />
javascript:(function(){bds=document.getElementsByTagName('body');bd=bds.item(0);div=document.createElement('div');s=div.style;s.position='fixed';s.top='10px';s.left='10px';s.padding='20px';s.zIndex='100';s.textAlign='center';s.border='solid%202px%20#666';s.background='#eee';frm=document.createElement('iframe');frm.style.width='350px';frm.style.height='100px';frm.style.border='none';frm.src='http://www.chromefans.org/pr/?u='+escape(location.href);f=document.createElement('form');f.name='f';btn=document.createElement('input');btn.name='btn';btn.type='button';btn.value='x';btn.onclick=function(){document.body.removeChild(div);};bd.appendChild(div);div.appendChild(frm);f.appendChild(btn);div.appendChild(f);document.f.btn.focus()})();