Skip to content

Instantly share code, notes, and snippets.

@elpeo
elpeo / app.rb
Last active Apr 13, 2016
tiqavot
View app.rb
require 'sinatra'
require 'json'
require 'rest-client'
require 'open-uri'
post '/callback' do
params = JSON.parse(request.body.read) rescue Hash.new([])
params['result'].each do |msg|
img = nil
@elpeo
elpeo / gplus2twitter.rb
Created Oct 14, 2012
Google+ to Twitter with Photo and Coordinates for new Twitter API.
View gplus2twitter.rb
#!/usr/bin/env ruby
$KCODE = 'u'
require 'net/https'
require 'open-uri'
require 'time'
require 'jcode'
require 'tmpdir'
require 'rubygems'
@elpeo
elpeo / gplus2twitter.rb
Created Sep 6, 2012
Google+ to Twitter with Photo and Coordinates
View gplus2twitter.rb
#!/usr/bin/env ruby
require 'net/https'
require 'open-uri'
require 'time'
require 'tmpdir'
require 'rubygems'
require 'oauth'
require 'json/pure'
@elpeo
elpeo / gist:1972632
Created Mar 4, 2012
search_control for section link
View gist:1972632
Index: ja/search_control.rb
===================================================================
--- ja/search_control.rb (リビジョン 3712)
+++ ja/search_control.rb (作業コピー)
@@ -61,6 +61,7 @@
Search_control_categories = [
[ '最新', 'latest' ],
[ '一日分', 'day' ],
+ [ 'セクション', 'section' ],
[ '一月分', 'month' ],
@elpeo
elpeo / gist:1613598
Created Jan 15, 2012
add Grow! button
View gist:1613598
--- a/plugin/section_footer2.rb
+++ b/plugin/section_footer2.rb
@@ -48,7 +48,7 @@ unless defined?(subtitle)
end
def init_buttons_status
- @installed_buttons = ['yaml', 'delicious', 'hatena', 'facebook', 'twitter', 'plusone']
+ @installed_buttons = ['yaml', 'delicious', 'hatena', 'facebook', 'twitter', 'plusone', 'grow']
if @conf['section_footer2.isDisplay'].nil?
@conf['section_footer2.isDisplay'] = ''
@elpeo
elpeo / gplus2twitter.rb
Created Sep 21, 2011
Google+ to Twitter
View gplus2twitter.rb
#!/usr/bin/env ruby
require 'open-uri'
require 'time'
require 'tmpdir'
require 'rubygems'
require 'oauth'
require 'json/pure'
user_id = '(Your Google+ user ID)'