Data
123 oh.duh.se
9000 duh.seOutput
| # This is a code example for the Ruby HTTP library Typhoeus | |
| # here's an example for twitter search | |
| # Including Typhoeus adds http methods like get, put, post, and delete. | |
| # What's more interesting though is the stuff to build up what I call | |
| # remote_methods. | |
| class Twitter | |
| include Typhoeus | |
| remote_defaults :on_success => lambda {|response| JSON.parse(response.body)}, | |
| :on_failure => lambda {|response| puts "error code: #{response.code}"}, |
| #!/usr/bin/ruby | |
| require 'socket' | |
| require 'rubygems' | |
| require "xmpp4r" | |
| require "xmpp4r/pubsub" | |
| require "xmpp4r/pubsub/helper/servicehelper.rb" | |
| require "xmpp4r/pubsub/helper/nodehelper.rb" | |
| require "xmpp4r/pubsub/helper/nodehelper.rb" |
| require 'curses' | |
| include Curses | |
| stdscr.keypad c=v=h=1 | |
| def w t,*o | |
| setpos *o | |
| addstr t | |
| refresh | |
| end | |
| l=7 | |
| p=0 |
Data
123 oh.duh.se
9000 duh.seOutput
| find . -name '.git' -type d | while read git_path; do | |
| ( | |
| cd `dirname $git_path` | |
| (git remote -v|grep -q gitlab) && echo "`dirname $git_path` is still on gitlab" | |
| ) | |
| done |
| # Please convert this to a Sublime Text 3 plugin. | |
| require 'curses' | |
| Curses.init_screen | |
| SOURCE_LINES = File.read(__FILE__).split("\n") | |
| TracePoint.trace(:line) do |tp| | |
| Curses.clear | |
| SOURCE_LINES.each_with_index do |src,row| | |
| Curses.setpos(row, 0) | |
| Curses.addstr(src) | |
| end |
| Writing a byte at a time...done | |
| Writing intelligently...done | |
| Rewriting...done | |
| Reading a byte at a time...done | |
| Reading intelligently...done | |
| start 'em...done...done...done...done...done... | |
| Create files in sequential order...done. | |
| Stat files in sequential order...done. | |
| Delete files in sequential order...done. | |
| Create files in random order...done. |
| wrk.method = "POST" | |
| wrk.body = "<?xml version=\"1.0\"?><methodCall><methodName>weblogUpdates.ping</methodName><params><param><value>Twingly Blog</value></param></params></methodCall>" | |
| wrk.headers["Content-Type"] = "text/xml" |
$ iozone -l 32 -O -i 0 -i 1 -i 2 -e -+n -r 4K -s 4G
Iozone: Performance Test of File I/O
| --- nginx.conf.prev Sun Oct 12 20:44:43 2014 | |
| +++ nginx.conf Sun Oct 12 20:52:44 2014 | |
| @@ -8,13 +8,13 @@ | |
| events { | |
| - worker_connections 1024; | |
| + worker_connections 1024; | |
| } | |