- styleでフォントサイズが指定されている場合はReader側でフォントサイズを変更できない
- imgタグを含むノートは同期はできるが開けないから,画像はen-mediaを使ってノートに添付するほうがいい
- 一度同期したノートの名前を変更すると同期に失敗するので,そのときはそのノートを他のノートブックに移し,Readerからも削除して再同期
- EvernoteClearlyだけでなく,AndroidのEvernoteアプリから作成したWebクリップも表示できる
- 生Stringをアップロードするとき,content(タグ以外)はURIエスケープされていないといけない
- フォントを斜体にするときは
styleではなくiタグを使わないといけない - HTMLの特殊文字(
©)は表示できず,エラーが表示される。すごく邪魔。
This file contains hidden or 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 'twitter' | |
| Client = Twitter::REST::Client.new do |config| | |
| config.consumer_key = 'ia662KE5wzuiovgmKtl82Bw22' | |
| config.consumer_secret = 'SLZ9SYfjzyEwpSCwh6kng8lP3TCevoPNSgZ6UWgUujfU1WWuCU' | |
| config.access_token = 'your access token' | |
| config.access_token_secret = 'your access token secret' | |
| end | |
| i = FileTest.exist?('/tmp/saikoh') ? File.read('/tmp/saikoh').to_i : 0 |
This file contains hidden or 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 'nokogiri' | |
| page = Nokogiri::HTML(open("./twins.html")) | |
| page.xpath('//tbody/tr[@bgcolor="#dddddd"]').each do |node| | |
| puts | |
| hyoka = node.elements[6].text #評価 | |
| node.elements[6].inner_html = if /[ABCD]/ =~ hyoka | |
| 'D' | |
| else | |
| 'F' |
This file contains hidden or 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 'json' | |
| def entities_length(tweet) | |
| indices = [] | |
| tweet['entities']['user_mentions'].each do |item| | |
| indices << item['indices'] | |
| end | |
| tweet['entities']['urls'].each do |item| |
This file contains hidden or 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 'erb' | |
| INT_SIZE = 4 | |
| str = ARGV[0].chomp | |
| chars = str.chars | |
| i = 0 | |
| chars16 = [] | |
| ((chars.size / INT_SIZE)+1).times do |i| | |
| chars16[i] = [] |
This file contains hidden or 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
| Plugin.create :fav2u do | |
| count = 0 | |
| onappear do |ms| | |
| ms.each do |m| | |
| user = m.user | |
| if m.user.to_s == 'toshi_a' | |
| m.message.favorite(true) | |
| count += 1 | |
| puts 'ふぁぼった ' + count.to_s | |
| end |
This file contains hidden or 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
| fp = fopen(argv[1], "r"); | |
| if(! fp) | |
| { | |
| printf("can't open %s\n", argv[1]); | |
| return 1; | |
| } | |
| i = 0; | |
| mode = 0; /* 0=>name, 1=>point */ | |
| while ((ch = fgetc(fp)) != EOF) { |
This file contains hidden or 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
| class String | |
| def sentouryoku | |
| return self.each_byte.to_a.inject(0) { |sum,i| sum*256 + i } | |
| end | |
| def *(otr) | |
| return self.sentouryoku * otr.to_s.sentouryoku | |
| end | |
| end |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| Plugin.create(:tl_speed) do | |
| home_tl = Plugin[:gtk].widgetof(timeline(:home_timeline)) | |
| count = 0 | |
| on_update do |service, messages| | |
| home_tl ||= Plugin.create(:gtk).widgetof(timeline(:home_timeline)) | |
| time = Time.now | |
| count = 0 | |
| (home_tl || []).each_with_index do |message,i| |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| module FuckinMaker | |
| def column(target = '') | |
| hbox = Gtk::HBox.new( true, 0 ) | |
| hbox.pack_start(Gtk::Label.new(target), false, false, 0 ) | |
| entry = Gtk::Entry.new | |
| entry.text = target | |
| hbox.pack_start(entry, false, false, 0) | |
| return [hbox, entry] |