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 | |
# -*- coding: utf-8 -*- | |
# | |
require 'shellwords' | |
if ARGV.length == 0 | |
STDERR.puts "% gyazo query" | |
STDERR.puts "% gyazo -f uploadfile1 uploadfile2" | |
exit | |
end |
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> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>title</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<img id="img" src="http://gyazo.com/892d6b42a6a6db62ec368f90f0952984.png"> | |
<script> |
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
main(){ | |
printf("hello"); | |
} |
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 | |
require 'rubygems' | |
require 'gyazz' | |
title = ARGV[0] | |
if !title then | |
puts "% memo title" | |
exit | |
end |
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
require 'rubygems' | |
require 'logger' | |
require 'active_record' | |
# ActiveRecord::Base.logger = Logger.new(STDERR) | |
# ActiveRecord::Base.colorize_logging = false | |
if File.exist?("3memo.sqlite3") then | |
File.delete("3memo.sqlite3") | |
end |
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($){ | |
$.fn.test = function(){ | |
this.on('mousedown',mousedownFunc(this)); | |
this.name = "NAMENAME"; | |
} | |
function mousedownFunc(obj){ | |
return function(e){ | |
alert(obj.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
(function($){ | |
$.fn.test = function(){ | |
this.on('mousedown',mousedown); | |
this.name = "NAMENAME"; | |
} | |
var mousedown = function(e){ | |
// ここで this.name の値を知るにはどうする? | |
} | |
})(jQuery); |
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
require "hondana" | |
include Hondana | |
shelf = Shelf.new('増井') | |
shelf.books.each { |book| | |
puts book.isbn | |
puts book.title | |
} | |
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
require 'rubygems' | |
require 'active_record' | |
# | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'mysql', | |
:host => 'localhost', | |
:username => 'root', | |
:password => '', | |
:database => 'hondana', | |
:encoding => 'utf8' |
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/env ruby | |
# -*- coding: utf-8 -*- | |
# | |
# 全画面Gyazoると同時にファイル情報/アプリ情報のメタデータをアップする | |
# | |
require 'net/http' | |
require 'json' | |
require 'digest/md5' |