Skip to content

Instantly share code, notes, and snippets.

@elpeo
elpeo / gplus2twitter.rb
Created September 21, 2011 23:21
Google+ to Twitter
#!/usr/bin/env ruby
require 'open-uri'
require 'time'
require 'tmpdir'
require 'rubygems'
require 'oauth'
require 'json/pure'
user_id = '(Your Google+ user ID)'
@elpeo
elpeo / gist:1613598
Created January 15, 2012 00:35
add Grow! button
--- 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 / gist:1972632
Created March 4, 2012 11:48
search_control for section link
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 / gplus2twitter.rb
Created September 6, 2012 21:56
Google+ to Twitter with Photo and Coordinates
#!/usr/bin/env ruby
require 'net/https'
require 'open-uri'
require 'time'
require 'tmpdir'
require 'rubygems'
require 'oauth'
require 'json/pure'
@elpeo
elpeo / gplus2twitter.rb
Created October 14, 2012 18:42
Google+ to Twitter with Photo and Coordinates for new Twitter API.
#!/usr/bin/env ruby
$KCODE = 'u'
require 'net/https'
require 'open-uri'
require 'time'
require 'jcode'
require 'tmpdir'
require 'rubygems'
@elpeo
elpeo / app.rb
Last active April 13, 2016 03:24
tiqavot
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