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
javascript:(function(){var url='http://localhost/myBookmarklet/entry.php/';function o(title, src_url){var m=window.open(url+'?title='+title+'&src_url='+src_url, 'a', 'width=600, height=400');}o(encodeURIComponent(document.title),encodeURIComponent(location.href));})(); |
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
<html> | |
<head> | |
<script src="./jquery-1.10.1.min.js"></script> | |
</head> | |
<!-- | |
--> | |
<body> | |
<div id="current_video"> | |
<span>http://a1309.v.phobos.apple.com/us/r20/Video/ae/8c/b7/mzm.qbpqfrmo..640x480.h264lc.u.p.m4v</span> | |
<video src="http://a1309.v.phobos.apple.com/us/r20/Video/ae/8c/b7/mzm.qbpqfrmo..640x480.h264lc.u.p.m4v" width="100" height="100" controls autoplay></video> |
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
use strict; | |
use warnings; | |
use LWP::Simple; | |
use URI::Escape; | |
my $base_url = "http://itunes.apple.com/search?"; | |
my %params; | |
my $name = "宇多田ヒカル"; | |
$params{"country"} = "jp"; | |
$params{"media"} = "music"; |
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/python | |
# coding:utf-8 | |
import urllib | |
import urllib2 | |
import json | |
class ITunesSearchAPI: | |
def __init__( self, 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
#! /usr/bin/python | |
# coding: utf-8 | |
if __name__ == "__main__": | |
print '1234\'567890' | |
print '1234\\567890' | |
print '1234\n567890' | |
print '1234\t567890' |
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/python | |
# -*- coding: utf-8 -*- | |
# シングルまたは、ダブルクォートで括る 三連続はヒアドキュメントとして扱われる | |
print 'string' | |
print "string" | |
print """ | |
s1 | |
s2 | |
s3 |
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/python | |
# coding: utf-8 | |
import datetime | |
if __name__ == "__main__": | |
#今日の日時 | |
day = datetime.date.today() | |
time = datetime.datetime.today() |
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 | |
a.attname, | |
ty.typname, | |
a.atttypid, | |
a.atthasdef, | |
a.attnotnull, | |
a.attisdropped, | |
d.description | |
from | |
pg_stat_user_tables t |
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
$ rails new myproject | |
$ cd myproject | |
$ vi Gemfile | |
gem 'therubyracer' | |
$ rails generate scaffold friend colum1:string column2:string | |
$ rake db:create | |
$ rake db:migrate | |
$ rake db:seed |
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
<?php | |
$fp = stream_socket_client( "tcp://address:port", $error, $errorstr, 60 ); | |
if(!$fp){ printf( "%s (%d)", $errorstr, $error ); } | |
$i = 0; | |
while($i++ < 100){ | |
$message = sprintf( "%03d message\n", $i ); | |
fwrite( $fp, $message ); | |
print $message; | |
} |