Skip to content

Instantly share code, notes, and snippets.

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));})();
<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>
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";
#! /usr/bin/python
# coding:utf-8
import urllib
import urllib2
import json
class ITunesSearchAPI:
def __init__( self, name ):
#! /usr/bin/python
# coding: utf-8
if __name__ == "__main__":
print '1234\'567890'
print '1234\\567890'
print '1234\n567890'
print '1234\t567890'
#! /usr/bin/python
# -*- coding: utf-8 -*-
# シングルまたは、ダブルクォートで括る 三連続はヒアドキュメントとして扱われる
print 'string'
print "string"
print """
s1
s2
s3
#!/usr/bin/python
# coding: utf-8
import datetime
if __name__ == "__main__":
#今日の日時
day = datetime.date.today()
time = datetime.datetime.today()
@letitride
letitride / pgsql.usertables.info.sql
Created March 2, 2013 13:31
my tables infomation
SELECT
a.attname,
ty.typname,
a.atttypid,
a.atthasdef,
a.attnotnull,
a.attisdropped,
d.description
from
pg_stat_user_tables t
$ 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
<?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;
}