tl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile
rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)
tl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile
rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)
#import <Foundation/Foundation.h> | |
@interface NSObject (AssociatedDictionary) | |
+ (NSMutableDictionary*)associatedDictionary; | |
- (NSMutableDictionary*)associatedDictionary; | |
@end |
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
require 'stringio' | |
require 'timeout' | |
class Object | |
def methods_returning(expected, *args, &blk) | |
old_stdout = $> | |
$> = StringIO.new | |
methods.select do |meth| | |
Timeout::timeout(1) { dup.public_send(meth, *args, &blk) == expected rescue false } rescue false |
class ApplicationController < ActionController::Base | |
before_filter :ensure_xhr | |
private | |
def ensure_xhr | |
if request.get? && request.format && (request.format.js? || request.format.json?) | |
head :forbidden unless request.xhr? | |
end | |
end | |
end |
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J
CREATE TABLE `customer` ( | |
`c_id` int(11) NOT NULL, | |
`c_d_id` tinyint(4) NOT NULL, | |
`c_w_id` smallint(6) NOT NULL, | |
`c_first` varchar(16) DEFAULT NULL, | |
`c_middle` char(2) DEFAULT NULL, | |
`c_last` varchar(16) DEFAULT NULL, | |
`c_street_1` varchar(20) DEFAULT NULL, | |
`c_street_2` varchar(20) DEFAULT NULL, | |
`c_city` varchar(20) DEFAULT NULL, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
require 'fiddle' | |
module IAmAHorriblePerson | |
def unset flag | |
value = _wrap self | |
flags = 8.times.map { |i| value[i] }.pack('C8').unpack('Q').first | |
[flags & ~flag].pack('Q').unpack('C8').each_with_index { |n,i|value[i] = n } | |
end | |
def class= k |