This file contains hidden or 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
bootstrap: checking installation... | |
./bootstrap.sh: illegal option -- 4 | |
bootstrap: autoconf version 2.69 (ok) | |
bootstrap: automake version 1.12.4 (ok) | |
bootstrap: aclocal version 1.12.4 (ok) | |
bootstrap: libtool version 2.4.2 (ok) | |
Bootstrapping using: | |
autoconf : /usr/local/opt/autoconf/bin/autoconf | |
automake : /usr/local/opt/automake/bin/automake | |
aclocal : /usr/local/opt/automake/bin/aclocal |
This file contains hidden or 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
#!/bin/bash | |
server_ip=`route | grep default | awk '{print $2}'` | |
client_name=`cat /etc/hostname` | |
mac_address=`ifconfig -a | grep eth0 | awk '{print $5}'` | |
# echo $server_ip | |
#if [ -n $1 ]; then | |
# echo "Argument error, usage: ./ping.sh your_ip" | |
# exit 1 | |
#fi | |
for (( ; ; )) |
This file contains hidden or 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 'rubygems' | |
require 'bundler' | |
ENV["BUNDLE_GEMFILE"] = File.expand_path("../Gemfile", __FILE__) | |
Bundler.require |
This file contains hidden or 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
Simple mixer control 'Master',0 | |
Capabilities: pvolume pswitch pswitch-joined penum | |
Playback channels: Front Left - Front Right | |
Limits: Playback 0 - 31 | |
Mono: | |
Front Left: Playback 4 [13%] [-40.50dB] [on] | |
Front Right: Playback 4 [13%] [-40.50dB] [on] | |
Simple mixer control 'Master Mono',0 | |
Capabilities: pvolume pswitch pswitch-joined penum | |
Playback channels: Front Left - Front Right |
This file contains hidden or 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
// http://www.codingforums.com/showthread.php?t=71882 | |
function getDirectory( $path = '.', $level = 0 ){ | |
$ignore = array( 'cgi-bin', '.', '..' ); | |
// Directories to ignore when listing output. Many hosts | |
// will deny PHP access to the cgi-bin. | |
$dh = @opendir( $path ); | |
// Open the directory to the handle $dh |
This file contains hidden or 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 RubyChina | |
class API < Grape::API | |
version 'v1', :using => :header, :vendor => 'ruby_china', :format => :json | |
helpers do | |
def warden | |
env['warden'] | |
end |
This file contains hidden or 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
<div class="field"> | |
<%= f.label :food_ids %><br /> | |
<%= f.collection_select :food_ids, Food.all, "id", "name", {}, {:multiple => true} %> | |
</div> |
This file contains hidden or 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
#config/initializers/carrierwave.rb | |
CarrierWave.configure do |config| | |
if Rails.env.production? or Rails.env.development? | |
config.storage :cloud_files | |
config.cloud_files_username = "your_username" | |
config.cloud_files_api_key = "your_key" | |
config.cloud_files_container = "test" | |
config.cloud_files_cdn_host = "c0012345.cdnn.cloudfiles.rackspacecloud.com" | |
def store_dir |
This file contains hidden or 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
# encoding: utf-8 | |
class DbConnections | |
def self.set_connection(db) | |
Post.establish_connection({ | |
:adapter => "sqlite3", | |
:database => "db/development_#{db}.sqlite3", | |
:pool => 5, | |
:timeout => 5000 | |
}) | |
end |
This file contains hidden or 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
curl -d "user[login]=hello_guest&user[password]=justpasserror&user[password_confirmation]=justpasserror&user[email][email protected]" http://localhost:3001/account.json | |
{"_id":3,"created_at":"2011-12-19T15:36:48+08:00","current_sign_in_at":"2011-12-19T15:36:48+08:00","current_sign_in_ip":"127.0.0.1","email":"[email protected]","encrypted_password":"$2a$10$obXkqpBi7jkgZ7f3/wNEaOWHY55vs6a6RVdHOLJEus8/nxg2ZO8a6","follower_ids":[],"following_ids":[],"following_node_ids":[],"guest":false,"last_sign_in_at":"2011-12-19T15:36:48+08:00","last_sign_in_ip":"127.0.0.1","likes_count":0,"login":"hello_guest","replies_count":0,"sign_in_count":1,"state":1,"topics_count":0,"updated_at":"2011-12-19T15:36:48+08:00","verified":true} |