View config.ru
require 'rubygems'
require 'rack/reverse_proxy'
use Rack::ReverseProxy do
reverse_proxy '/callback', 'http://example.com/'
end
app = proc do |env|
[ 200, {'Content-Type' => 'text/plain'}, ["OK"] ]
end
View app.rb
require 'sinatra'
require 'httpclient'
CALLBACK_URI = URI.parse('http://example.com/callback')
configure do
set :httpclient, HTTPClient.new
end
post '/callback' do
View hls_capture.rb
#!/usr/bin/env ruby
require "open3"
base_url = ARGV.shift
hls_file = ARGV.shift
o, e, s = Open3.capture3 "curl #{base_url}#{hls_file}"
tslist = o.split("\n").delete_if{|i| i =~ /^#/ }
View ruby
require 'sinatra'
get '/' do
message = params['q'] || ''
halt 401, {'WWW-Authenticate' => "Basic realm=\"#{message}\""}, message
end
View misawa-sachika-entry-list
http://ameblo.jp/misawasachika/entry-10400557550.html
http://ameblo.jp/misawasachika/entry-10399751722.html
http://ameblo.jp/misawasachika/entry-10398965264.html
http://ameblo.jp/misawasachika/entry-10397504096.html
http://ameblo.jp/misawasachika/entry-10397439339.html
http://ameblo.jp/misawasachika/entry-10397238321.html
http://ameblo.jp/misawasachika/entry-10396650037.html
http://ameblo.jp/misawasachika/entry-10395980698.html
http://ameblo.jp/misawasachika/entry-10395243282.html
http://ameblo.jp/misawasachika/entry-10394505470.html
View gist:3bdcf52d7a16a899b907

最近買った腕時計の話

いつも使っている glide.so というサービスが滅びたので、このままやります。

LG G Watch 買いました

Android Wear について

View hackadoll.com.js
// ==UserScript==
// @include http://hackadoll.com/n/*
// ==/UserScript==
location.href = document.querySelector('.btn-readmore').href
View fastladder.rb
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Publish::Fastladder
# Author:: shunirr <http://s5r.jp>
# Created:: Aug 8, 2014
# Updated:: Aug 8, 2014
# Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
module Automatic::Plugin
class PublishFastladder
View fastladder.rb
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Publish::Fastladder
# Author:: shunirr <http://s5r.jp>
# Created:: Aug 8, 2014
# Updated:: Aug 8, 2014
# Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
module Automatic::Plugin
class PublishFastladder