- hoge
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 'rubygems' | |
| require 'uri' | |
| require 'rss' | |
| require 'redis' | |
| require 'json' | |
| require 'idobata' | |
| class PukiWikiRssReader | |
| def initialize (rss_url) | |
| charset = nil |
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 -*- | |
| require 'rubygems' | |
| require 'google/api_client' | |
| require 'yaml' | |
| require 'time' | |
| require 'date' | |
| require 'idobata' | |
| class GoogleCalendarManager |
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
| def assignCar(members, first_car_capacity) | |
| members.shuffle! | |
| puts "---First car members---" | |
| puts members.first(first_car_capacity) | |
| puts "---Second car members---" | |
| puts members.last(members.length-first_car_capacity) | |
| end | |
| # snorkel member's car assign | |
| snorkel_buf = File.read("snorkel_members.txt", :encoding => Encoding::UTF_8) |
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
| #!/usr/bin/env ruby | |
| # -*- encoding: utf-8 -*- | |
| require 'atomutil' | |
| USERNAME = ARGV[0] | |
| BLOG_DOMAIN = ARGV[1] | |
| PASSWORD = ARGV[2] | |
| POST_URI = "http://blog.hatena.ne.jp/#{USERNAME}/#{BLOG_DOMAIN}/atom/entry" |
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
| var image = "test.png"; | |
| var costomPhotoAlbum = require('ti.customphotoalbum'); | |
| costomPhotoAlbum.addCustomAlbumAndSaveImage(image, "ALBUM_NAME"); |
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
| try { | |
| throwURL(requestToken.getAuthorizationURL()); | |
| } catch (URISyntaxException ex) { | |
| ex.printStackTrace(); | |
| } catch (IOException ex) { | |
| ex.printStackTrace(); | |
| } |
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
| # -*- encoding: utf-8 -*- | |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'MeCab' | |
| mecab = MeCab::Tagger.new("") | |
| ARGV.each{ |arg| | |
| kana = '' | |
| parse_node = mecab.parseToNode(arg) |
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
| ;;バッファ全体の句読点と読点をコンマとピリオドに変換 | |
| (defun replace-commaperiod-buffer () | |
| (interactive "r") | |
| (save-excursion | |
| (replace-string "、" "," nil (point-min) (point-max)) | |
| (replace-string "。" "." nil (point-min) (point-max)))) | |
| ;;選択範囲内の全角英数字を半角英数字に変換 | |
| (defun hankaku-eisuu-region (start end) | |
| (interactive "r") |
NewerOlder