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
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| if [[ -n "$PS1" ]] ; then | |
| # don't put duplicate lines in the history. See bash(1) for more options | |
| # ... or force ignoredups and ignorespace | |
| HISTCONTROL=ignoredups:ignorespace |
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
| cd ~ | |
| mkdir .ssh | |
| touch .ssh/authorized_keys | |
| emacs .ssh/authorized_keys | |
| chmod 600 .ssh/authorized_keys |
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 | |
| LAN=eth0 | |
| LOCALNET_MASK=`ifconfig $LAN|sed -e 's/^.*Mask:\([^ ]*\)$/\1/p' -e d` | |
| LOCALNET_ADDR=`netstat -rn|grep $LAN|grep $LOCALNET_MASK|cut -f1 -d' '` | |
| LOCALNET=$LOCALNET_ADDR/$LOCALNET_MASK | |
| #/etc/init.d/iptables stop |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <netdb.h> | |
| void error(const char *msg){ |
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
| $ ab -n 100 -c 10 http://friedtofu-demo-yuki24.herokuapp.com/rfit/100/100...... | |
| This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking friedtofu-demo-yuki24.herokuapp.com (be patient).....done | |
| Server Software: Jetty(7.5.4.v20111024) | |
| Server Hostname: friedtofu-demo-yuki24.herokuapp.com |
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' | |
| => false | |
| > require 'mongoid' | |
| => true | |
| > class Person | |
| > include Mongoid::Document | |
| > end | |
| => Person | |
| > Person | |
| => Person |
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
| git clone git://github.com/jbrechtel/robospecs.git | |
| cd robospecs | |
| sbt publish-local |
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 'rack' | |
| Rack::Server.start(app: Proc.new{|env| [200, {'Content-Type' => 'text/html'}, env]}, Port: 8080) |
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
| /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:761: [BUG] Segmentation fault | |
| ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] | |
| -- Control frame information ----------------------------------------------- | |
| c:0066 p:0015 s:0266 b:0264 l:000263 d:000263 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:761 | |
| c:0065 p:0011 s:0256 b:0256 l:000255 d:000255 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755 | |
| c:0064 p:0048 s:0253 b:0253 l:000252 d:000252 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:744 | |
| c:0063 p:0182 s:0250 b:0250 l:000249 d:000249 METHOD /home/yuki/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:557 | |
| c:0062 p:0031 s:0237 b:0237 l:000ac0 d:000ac0 METHOD /home/yuki/.rvm/gems/ruby-1.9.3-p194@potter/gems/capybara-1.1.2/lib/capybara/server.rb:47 | |
| c:0061 p:0011 s:0233 b:0233 l:001538 d:000232 BLOCK /home/yuki/.rvm/gems/ruby-1.9.3-p194@potter/gems/capybara-1.1.2/lib/capybara/server.rb:69 |
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 'hashie' | |
| class Foo < Hashie::Mash | |
| def initialize(arg, options = {}) | |
| options[:key] | |
| super(options) | |
| end | |
| end |