This file contains 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
module TwitterOAuth | |
class Client | |
def get_lists(user) | |
get("/lists/list.json?screen_name=#{user}") | |
end | |
end | |
end | |
module Earthquake::Input | |
def lists |
This file contains 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
Earthquake.init do | |
_ = config[:auto_restart] ||= {} | |
_[:interval] ||= 60 * 60 | |
system "stty echo" # for readline | |
EM.defer do | |
sleep config[:auto_restart][:interval] | |
loop do | |
if Readline.line_buffer.nil? || Readline.line_buffer.empty? |
This file contains 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
Earthquake.init do | |
output do |item| | |
next unless item['text'] | |
next unless config[:separator] | |
unless config[:screen_width] | |
begin | |
require 'curses' | |
screen = Curses.init_screen | |
config[:screen_width] = screen.maxx |
This file contains 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 "open-uri" | |
require "openssl" | |
Earthquake.init do | |
output_filter do |item| | |
next unless item['text'] | |
text = item["text"] | |
text = item['retweeted_status']['text'] unless item['retweeted_status'].nil? | |
text.scan( /https?:\/\/t\.co\/[a-zA-Z0-9\-]+/ ).each do |url| | |
uri = URI.parse url |
This file contains 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
%w(sinatra/base json pygments).each{|x| require x} | |
inp = ARGF.read | |
jsn = JSON.pretty_generate(JSON.parse inp) | |
Sinatra.new{ get("/"){ "<style>#{Pygments.css}</style>#{Pygments.highlight(jsn, :lexer => 'json')}" }}.run! |
This file contains 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
(* | |
* Finder Open iTerm Here - v1.0.2 - 4/14/2011 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2011 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*) | |
tell application "Finder" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
(function(){ | |
/* | |
* 2011.1.8 InDesign Script勉強会お題① | |
* CSV(二次元配列)の2番目と4番目をフレームに入れる | |
*/ | |
var csv = [ | |
["aaa1","bbb1","ccc1","ddd1"], | |
["aaa2","bbb2\rbbb2","ccc2","ddd2"], |