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
*** stone-2.3d-2.3.2.7.org/Makefile 2008-02-05 08:00:00.000000000 +0900 | |
--- stone-2.3d-2.3.2.7/Makefile 2013-04-18 13:01:12.253674581 +0900 | |
*************** | |
*** 97,103 **** | |
$(MAKE) FLAGS="-DNT_SERVICE $(FLAGS)" LIBS="$(LIBS) $(SVC_LIBS) -ladvapi32 -luser32 -lshell32 -lkernel32" $(TARGET) | |
linux: | |
! $(MAKE) FLAGS="-O -Wall -DCPP='\"/usr/bin/cpp -traditional\"' -DPTHREAD -DUNIX_DAEMON -DPRCTL -DSO_ORIGINAL_DST=80 -DUSE_EPOLL $(FLAGS)" LIBS="-lpthread $(LIBS)" stone | |
linux-pop: |
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 | |
class Runner | |
attr_reader :args | |
def initialize(args) | |
@args = args | |
end | |
def run | |
targets = targets_by_args %w(/Volumes/Name1 /Volumes/Name2 /Volumes/Name3) |
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 'spec_helper' | |
# This spec was generated by rspec-rails when you ran the scaffold generator. | |
# It demonstrates how one might use RSpec to specify the controller code that | |
# was generated by Rails when you ran the scaffold generator. | |
# | |
# It assumes that the implementation code is generated by the rails scaffold | |
# generator. If you are using any extension libraries to generate different | |
# controller code, this generated spec may or may not pass. | |
# |
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 'spec_helper' | |
describe "Orders" do | |
describe "GET /orders" do | |
it "works! (now write some real specs)" do | |
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers | |
get orders_path | |
response.status.should be(200) | |
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
# app/models/link.rb | |
class Link < ActiveRecord::Base | |
belongs_to :site | |
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
(function(jQuery) { | |
var matched, browser; | |
// Use of jQuery.browser is frowned upon. | |
// More details: http://api.jquery.com/jQuery.browser | |
// jQuery.uaMatch maintained for back-compat | |
var uaMatch = function( ua ) { | |
ua = ua.toLowerCase(); |
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
class Object | |
def present_or(value) | |
return self if self.present? | |
value | |
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
require 'ipaddr' | |
class FacebookIPRange | |
def self.zones | |
@@zones ||= build_zones | |
end | |
def self.match(ipaddr) | |
zones.each do |zone| |
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
class CreateBags < ActiveRecord::Migration | |
def change | |
create_table :bags do |t| | |
t.references :user, index: true | |
t.timestamps | |
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
# generate apache compatible htpasswd file using Ruby. | |
require 'webrick' | |
if ARGV.size < 3 | |
puts "usage: #{$0} password-file user password" | |
exit 1 | |
end | |
# create htpassword instance |