Skip to content

Instantly share code, notes, and snippets.

tobynet tobynet

  • Toyama, Japan
Block or report user

Report or block tobynet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tobynet
tobynet / miku_beam.rb
Last active Aug 29, 2015 — forked from firstspring1845/miku_beam.rb
Mikutter プラグインのみくビームを汎用的にして、earthquake.gem pluginに移植
View miku_beam.rb
# -*- coding: utf-8 -*-
#
# Miku beam plugin for earthquake.gem
#
# Usage:
# :mikubeam
# update 'みくビーム!みくみくみくみくwwwwwwww'
#
# :javabeam ねこ
# update 'ねこビーム!ねこねこねこねこwwwwwwww'
View miku_beam.rb
# -*- coding: utf-8 -*-
Plugin.create :miku_beam do
command(:miku_beam,
name: 'みくビーム',
condition: lambda{ |opt| true},
visible: false,
role: :window) do |opt|
Service.primary.post(:message => 'みくビーム!みくみくみくみくwwwwwwww')
end
end
@tobynet
tobynet / javabeam.rb
Last active Aug 29, 2015 — forked from firstspring1845/java_beam.rb
Mikutter のプラグインJavaビームプラグインをearthquake.gem Pluginに移植したもの
View javabeam.rb
# -*- coding: utf-8 -*-
# Java beam plugin for earthquake.gem
#
# Usage:
# :javabeam
# update 'Javaビームビビビビビビビwwwwwwwwww'
#
# :javabeam 猫
# update '猫ビームビビビビビビビwwwwwwwwww'
#
@tobynet
tobynet / cakesgetter.py
Last active Dec 11, 2015 — forked from laiso/cakesgetter.py
ツイッター検索からcakes無料時間の記事を探してダウンロードしておくスクリプト
View cakesgetter.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
cakegetter.py
ツイッター検索からcakes無料時間の記事を探してダウンロードしておくスクリプト
"""
import os
import re
@tobynet
tobynet / deploy.rake
Created May 19, 2012 — forked from njvitto/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
View deploy.rake
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]
@tobynet
tobynet / mix_noun.rb
Created Apr 1, 2012 — forked from hitode909/mix_noun.rb
文を2つ入力して最初の文の名詞以外と2つめの文の名詞だけを使って文章を作るやつ
View mix_noun.rb
# -*- coding: utf-8 -*-
require 'open-uri'
require 'nokogiri'
require 'MeCab'
class WordsArray < Array
def nouns
select{ |w|
w.is_noun
}
View sort_jp_boundary
#! /usr/bin/env ruby
puts ARGF.read.split(/\b+/).map{|x|x.split(//).sort.join }.join
@tobynet
tobynet / coderwall.rb
Created Nov 27, 2011 — forked from vivien/coderwall.rb
Simple and Stupid Ruby API for Coderwall.com
View coderwall.rb
# Simple and Stupid Ruby API for Coderwall.com
# Vivien Didelot <vivien@didelot.org>
require "open-uri"
require "json"
module CoderWall
class Achievement
attr_reader :name, :badge, :description
View sanmoji.rb
require "mechanize"
alice = Mechanize.new
list = []
%w{a b c d e f g h i j k l m n o p q l s t u v w x y z 1 2 3 4 5 6 7 8 9 0}.each{|x|
%w{a b c d e f g h i j k l m n o p q l s t u v w x y z 1 2 3 4 5 6 7 8 9 0}.each{|y|
%w{a b c d e f g h i j k l m n o p q l s t u v w x y z 1 2 3 4 5 6 7 8 9 0}.each{|z|
list << x+y+z
}
}
}
View hatena_to_delicious.rb
require "mechanize"
alice = Mechanize.new
(0..20).each{|q|
t = q*50 + 1
page = alice.get "http://tophatenar.com/ranking/subscriber/#{t}?blog=hatena"
page.root.xpath("//td[@class='odd']/a").map{|x| x["href"].split("/").last}.uniq.each{|d|
begin
page = alice.get "http://delicious.com/register"
form = page.forms[1]
form.username = d
You can’t perform that action at this time.