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
var libron = libron ? libron : new Object(); | |
libron.osaka = { | |
name: '大阪府', | |
groups: ['大阪の公共図書館','北摂','北・中河内','南河内','泉州','大阪の類縁機関','近畿の公共図書館','全国サイト'], | |
libraries: { | |
'osaka':{'group':'大阪の公共図書館', 'name':'大阪府立図書館', 'code':'osaka'}, | |
'osaka_c':{'group':'大阪の公共図書館', 'name':'大阪市立図書館', 'code':'osaka_c'}, | |
'ikeda':{'group':'北摂', 'name':'池田市', 'code':'ikeda'}, | |
'ibaraki':{'group':'北摂', 'name':'茨木市', 'code':'ibaraki'}, | |
'suita':{'group':'北摂', 'name':'吹田市', 'code':'suita'}, |
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
// ==UserScript== | |
// @name atnd2gcal | |
// @namespace http://www.kugimiyabyou.net/ | |
// @include http://atnd.org/events/* | |
// @description makoto takagi / oooooorz@gmail.com | |
// ==/UserScript== | |
(function(){ | |
// version 1.0 | |
// ÉoÉOóvñ]ÇÕ oooooorz@gmail.com Ç…Ç®ímÇÁÇπÇ¢ÇΩÇæÇØÇÍÇŒèoóàÇÈå¿ÇËëŒâûǵNjÇ∑ÅB |
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
#!/usr/bin/env ruby | |
require "rubygems" | |
require "twitter" | |
require "nokogiri" | |
require "open-uri" | |
url = "http://userscripts.org/scripts/show/73877" | |
doc = Nokogiri::HTML(open(url).read) # Ruby 1.8.6 では read が必要。1.8.7 では不要。 | |
doc.css("#details").text[/(\d+) times/] | |
count = $1 |
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
namespace :myapp do | |
desc 'Captures a heroku bundle and downloads it. The downloaded files are stored in backups/' | |
task :backup do | |
app_name = RAILS_ROOT.split('/').last | |
timestamp = `date -u '+%Y-%m-%d-%H-%M'`.chomp | |
bundle_name = "#{app_name}-#{timestamp}" | |
puts "Capturing bundle #{bundle_name}..." | |
`heroku bundles:capture --app #{app_name} '#{bundle_name}'` | |
# poll for completion (warning, a little hacky) | |
begin |
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
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>regasm /codebase c:\LibronToolbar\ | |
LibronToolbar.dll | |
Microsoft(R) .NET Framework Assembly Registration Utility 4.0.30319.1 | |
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved. | |
RegAsm : error RA0000 : ファイルまたはアセンブリ 'file:///c:\LibronToolbar\Libro | |
nToolbar.dll'、またはその依存関係の 1 つが読み込めませんでした。操作はサポートさ | |
れません。 (HRESULT からの例外: 0x80131515) |
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 ActionView | |
module Helpers | |
module FormTagHelper | |
def image_submit_tag(source, options = {}) | |
options.stringify_keys! | |
if confirm = options.delete("confirm") | |
options["onclick"] ||= '' | |
options["onclick"] += "return #{confirm_javascript_function(confirm)};" | |
end |
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
*** form_tag_helper.rb 2010-10-22 10:24:55.000000000 +0900 | |
--- form_tag_helper_jishiha.rb 2010-10-22 11:16:43.000000000 +0900 | |
*************** | |
*** 409,414 **** | |
--- 409,415 ---- | |
# prompt with the question specified. If the user accepts, the form is | |
# processed normally, otherwise no action is taken. | |
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input. | |
+ # * <tt>:disable</tt> - If set to true, the submit button is disabled when the form is submitted. | |
# * Any other key creates standard HTML options for the tag. |
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 Lokka | |
module RedirectIfHeroku | |
def self.registered(app) | |
app.before do | |
site_url = ENV['SITE_URL'] || 'http://heroku.com' | |
redirect site_url, 301 if request.host =~ /\.heroku\.com$/ | |
end | |
end | |
end | |
end |
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
<VirtualHost *:80> | |
ServerName testapp # hosts ファイルに 127.0.0.1 testapp を設定しておく | |
DocumentRoot "/Users/user/rails/testapp/public" | |
ErrorLog /Users/user/rails/testapp/log/error.log | |
CustomLog /Users/user/rails/testapp/log/access.log common | |
SetEnv GEM_HOME /Users/user/.rvm/gems/ruby-1.8.7-p249 # <-- .rvm 以下の gems フォルダを指定する | |
SetEnv GEM_PATH /Users/user/.rvm/gems/ruby-1.8.7-p249:/Users/user/.rvm/gems/ruby-1.8.7-p249@global # <-- .rvm 以下の gems フォルダを指定する | |
RackEnv development # <-- RailsEnv ではない | |
<Directory "/Users/user/rails/testapp/public"> | |
Order allow,deny |
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
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
if (dispatch_queue_create != NULL) { | |
main_queue = dispatch_get_main_queue(); | |
timeline_queue = dispatch_queue_create("com.ey-office.gcd-sample.timeline", NULL); | |
image_queue = dispatch_queue_create("com.ey-office.gcd-sample.image", NULL); | |
dispatch_async(timeline_queue, ^{ | |
[self getPublicTimeline]; |