Skip to content

Instantly share code, notes, and snippets.

View morygonzalez's full-sized avatar
🌴
I may be slow to respond.

Hitoshi Nakashima morygonzalez

🌴
I may be slow to respond.
View GitHub Profile
#!/usr/bin/env ruby
# @author Aaron Lampros
#
# Github-flavored markdown to HTML, in a command-line util.
#
# $ cat README.md | ./github-flavored-markdown.rb
#
# Notes:
# You will need to install Pygments for syntax coloring
# ```bash
@morygonzalez
morygonzalez / shinudan.rb
Last active December 26, 2015 04:49
Yet Another 俳句が読みたくなった時用 earthquake plugin
#-*- coding: utf-8 -*-
# shinudan tweet / earthquake plugin
#
# shinudan: http://shindanmaker.com/198940
#
require 'net/http'
require 'nokogiri'
Earthquake.init do
command %r|^:shinudan\s*(.+)*|, :as => :shinudan do |m|
@morygonzalez
morygonzalez / the_legacy_searcher.rb
Created September 17, 2013 01:11
ag(The Silver Searcher)でEUC-JP/Shift-JISのファイルも検索できるようにしてみた - Thinking-megane http://blog.monochromegane.com/blog/2013/09/15/the-silver-searcher-detects-japanese-char-set/ homebrew 化した。
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# /usr/local/Library/Contributions/example-formula.rb
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class TheLegacySearcher < Formula
homepage ''
url 'https://github.com/monochromegane/the_silver_searcher/archive/legacy-0.1.tar.gz'
sha1 '9608f10564c64081a38a345ee6848c570a0266f9'
@morygonzalez
morygonzalez / always_140.rb
Created January 9, 2013 05:08
earthquake.gem で必ず140文字投稿する
# coding: utf-8
# always tweet with 140 characters
# port of https://gist.github.com/453709
#
Earthquake.init do
command :t140 do |m|
max = 140
body = m[1]
len = body.length
@morygonzalez
morygonzalez / favstar.rb
Created September 13, 2012 09:03 — forked from siyo/favstar.rb
favstar ふぁぼったりRTしたユーザ名も見るやつ(色つき) / earthquakge.gem plugin
# -*- coding: utf-8 -*-
# favstar / earthquakge.gem plugin
#
# e.g. :favstar #=> your favstar
# :favstar who #=> who's favstar
#
require 'open-uri'
require 'nokogiri'
Earthquake.init do
@morygonzalez
morygonzalez / takagi.rb
Created July 5, 2012 01:58 — forked from siyo/takagi.rb
高木っぽいRT plugin.rb
# -*- coding: utf-8 -*-
# takagi RT
#
# e.g. :takagi $xx
#
Earthquake.init do
command %r|^:takagi\s+(\d+)$|, :as => :takagi do |m|
st = cache.read("status:" + m[1])
text = sprintf("だったら黙ってろクソが RT @%s %s" % [st["user"]["screen_name"], st["text"]])
async_e { twitter.update(text, :in_reply_to_status_id => m[1]) } if confirm("update '#{text}'")
# -*- coding: utf-8 -*-
# depends on Yahoo! Japan Web API
# http://help.yahoo.co.jp/help/jp/developer/developer-06.html
#
# usage:
# e.g. :erokimos 眠い # => update 'たわわに眠い' [Yn]
#
require 'net/http'
require 'nokogiri'
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4xdyu8QFfT+RS24rmCTaL4VL3FNibz3cN44aS2rxcEU+DomhkpDOPSw2e809wc+c+GHdu2K6z8k02ayMzjLR+4oMQ3b1Sy6H2Uy1TPGuZqgNdmoSZtNpAwxlXSiLc87MkdEqbk7VFQkCvuC82gSjwKuN8r+PZA8RiMROJW8JAnUxCwRIU7qVixMhqnGN7mvoPGLuGuqx+dttaKofe/aruYHI6RH9Eg/F6k3aAtFjhQTEbnfoL/sbnKY7XAxbkgrBKm2EufwU+7yJEddeim6YT1NzzLopK+5JpInlYVqgIu+8BJuPIoUghmffLhIyW8moGLwZ2g9CIfzwv2tmmpAbn morygonzalez@paperboy.co.jp
@morygonzalez
morygonzalez / github-follow-organization.user.js
Created May 14, 2012 02:58 — forked from technolize/github-follow-organization.user.js
github の organization ページにもフォローボタンを表示する
// ==UserScript==
// @name follow organization
// @description Show follow button on github organization page
// @namespace http://www.portalshit.net/
// @include https://github.com/*
// @version 0.1
// @license MIT License
// @work Google Chrome
// ==/UserScript==
@morygonzalez
morygonzalez / screen_name_prompt.rb
Created April 24, 2012 09:27 — forked from ryumu/screen_name_prompt.rb
Earthquake.gemのプロンプトにユーザー名を出すよ!プラグイン(色つき)
# coding: UTF-8
Earthquake.init do
once do
user = twitter.info['screen_name']
config[:prompt] = user.c(color_of(user)) + config[:prompt]
end
end