Skip to content

Instantly share code, notes, and snippets.

Avatar

takuya@mori takuya

  • Osaka City Univ
  • Osaka,Japan
View GitHub Profile
View evernote_add.rb
#!/usr/bin/env ruby
#coding:utf-8
require "rubygems"
require 'evernote'
#先程取得したToken
auth_token = "S=s23:U=270295:E=xxxxxxxxxxxx:C=xxxxxxxxx:P=1cd:A=en-devtoken:V=2:H=xxxxxxxxxxx816XXXXXXXXXXXX"
#ノートのエンドポイントのURL
note_store_url = "https://www.evernote.com/shard/s23/notestore"
# 正しくは以下のような形式じゃないとダメらしいけど、決め打ちでOKだった。
View ノートエクスポート.enex
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd">
<en-export export-date="20140215T165250Z" application="Evernote" version="Evernote Mac 5.5.0 (402474)">
<note><title>TODOテンプレート</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note>
<div><font face="'Hiragino Maru Gothic Pro'" color="#000C76" size="4">■①これは何? </font><font size="2">できたらどうなるの?</font>
</div>
<div>
<hr/>
View twitter_tweet
#!/usr/bin/env ruby
require 'optparse'
require 'open3'
text , image,url,video = nil
opt = OptionParser.new
opt.on("-i [image]", "--image", "Set Image to tweet ") { |e| image = e }
opt.on("-u [url]", "--url", "Set URL to tweet ") { |e| url = e }
opt.on("-v [video]", "--video", "Set video to tweet ") { |e| video = e }
View link_gnu_coreutils.rb
View kepco.rb
#!/usr/bin/env ruby
# coding: utf-8
require 'mechanize'
require 'kconv'
def regist( mail )
Thread.new{
m = Mechanize.new
View offline_page
#!/usr/bin/env ruby
require 'mechanize'
class Mechanize::Page
def embed_body
self.embed_style
self.embed_script
self.embed_images
View offline_page
#!/usr/bin/env ruby
# coding : utf-8
require 'mechanize'
class Mechanize::Page
def embed_body
self.embed_images
self.embed_style
self.embed_script
View offline_page
#!/usr/bin/env ruby
# coding : utf-8
require 'mechanize'
class Mechanize::Page
def embed_body
self.embed_images
self.embed_style
self.embed_script