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
#! /usr/bin/env ruby | |
STDOUT.sync = true | |
STDERR.sync = true | |
def run(cmd, *ok_statuses) | |
puts "\n=========> #{cmd}" | |
system(cmd) | |
unless ([0] + ok_statuses).include?($?) | |
puts "Exit status: #{$?}" |
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
count = 10000 | |
size = 100 // megabytes | |
hosts = ['host1', 'host2', 'host3', 'host4', 'host5'] | |
facilities = ['Server', 'Client', 'Proxy'] | |
chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz '.split(''); | |
speed = 1500.0; // messages per second | |
start = new Date().getTime() - 24*60*60*1000; |
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
puts "\n#{RUBY_ENGINE} #{RUBY_VERSION}:" | |
def run_tests | |
[ | |
"now.strftime('%L')", | |
"now.strftime('%N')", | |
"now.strftime('%Q')", | |
"now.to_datetime.strftime('%L')", | |
"now.to_datetime.strftime('%N')", | |
"now.to_datetime.strftime('%Q')", |
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
+[/Users/aleksi/.rvm/scripts/cli] : 669 : __rvm_parse_args() $ [[ -z '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 670 : __rvm_parse_args() $ export 'PS4=+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }' | |
+[/Users/aleksi/.rvm/scripts/cli] : 670 : __rvm_parse_args() $ PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }' | |
+[/Users/aleksi/.rvm/scripts/cli] : 692 : __rvm_parse_args() $ [[ -z '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 692 : __rvm_parse_args() $ [[ -n '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 694 : __rvm_parse_args() $ [[ 0 -eq 1 ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 694 : __rvm_parse_args() $ [[ -n '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 14 : __rvm_parse_args() $ [[ -n install ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 16 : __rvm_parse_args() $ rvm_token=install | |
+[/Users/aleksi/.rvm/scripts/cli] : 18 : __rvm_parse_args() $ [[ 1 -gt 0 ]] |
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
+[/Users/aleksi/.rvm/scripts/cli] : 669 : __rvm_parse_args() $ [[ -z '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 670 : __rvm_parse_args() $ export 'PS4=+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }' | |
+[/Users/aleksi/.rvm/scripts/cli] : 670 : __rvm_parse_args() $ PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }' | |
+[/Users/aleksi/.rvm/scripts/cli] : 692 : __rvm_parse_args() $ [[ -z '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 692 : __rvm_parse_args() $ [[ -n '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 694 : __rvm_parse_args() $ [[ 0 -eq 1 ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 694 : __rvm_parse_args() $ [[ -n '' ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 14 : __rvm_parse_args() $ [[ -n install ]] | |
+[/Users/aleksi/.rvm/scripts/cli] : 16 : __rvm_parse_args() $ rvm_token=install | |
+[/Users/aleksi/.rvm/scripts/cli] : 18 : __rvm_parse_args() $ [[ 1 -gt 0 ]] |
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
$ cat /Users/aleksi/.rvm/log/ruby-1.8.6-p420/rubygems.install.log | |
[2011-03-21 18:18:18] GEM_PATH='/Users/aleksi/.rvm/gems/ruby-1.8.6-p420:/Users/aleksi/.rvm/gems/ruby-1.8.6-p420@global:/Users/aleksi/.rvm/gems/ruby-1.8.6-p420@global' GEM_HOME='/Users/aleksi/.rvm/gems/ruby-1.8.6-p420' /Users/aleksi/.rvm/rubies/ruby-1.8.6-p420/bin/ruby /Users/aleksi/.rvm/src/rubygems-1.6.2/setup.rb | |
./lib/rubygems/custom_require.rb:54: warning: parenthesize argument(s) for future version | |
./lib/rubygems/custom_require.rb:57:in `require': undefined method `end_with?' for "no such file to load -- Win32API":String (NoMethodError) | |
from ./lib/rubygems/config_file.rb:55 | |
from ./lib/rubygems/custom_require.rb:36:in `gem_original_require' | |
from ./lib/rubygems/custom_require.rb:36:in `require' | |
from ./lib/rubygems/gem_runner.rb:8 | |
from ./lib/rubygems/custom_require.rb:36:in `gem_original_require' | |
from ./lib/rubygems/custom_require.rb:36:in `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
#ifndef BASE_H | |
#define BASE_H | |
#include "factory.h" | |
class Base | |
{ | |
public: | |
template<class BaseOrDerived> | |
Base(Factory<BaseOrDerived>* f) |
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
~/Code/QtPersistence/build (master) $ cmake .. -DGTEST_ROOT=/opt/local -DGMOCK_ROOT=/opt/local | |
-- The C compiler identification is GNU | |
-- The CXX compiler identification is GNU | |
-- Checking whether C compiler has -isysroot | |
-- Checking whether C compiler has -isysroot - yes | |
-- Check for working C compiler: /usr/bin/gcc | |
-- Check for working C compiler: /usr/bin/gcc -- works | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Checking whether CXX compiler has -isysroot |
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
$ cmake CMakeLists.txt | |
-- The C compiler identification is GNU | |
-- The CXX compiler identification is GNU | |
-- Checking whether C compiler has -isysroot | |
-- Checking whether C compiler has -isysroot - yes | |
-- Check for working C compiler: /usr/bin/gcc | |
-- Check for working C compiler: /usr/bin/gcc -- works | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Checking whether CXX compiler has -isysroot |
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 <QtCore/QCoreApplication> | |
#include <QtGui/QDesktopServices> | |
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
qDebug("before: %s", qPrintable(QDesktopServices::storageLocation(QDesktopServices::DataLocation))); | |
a.setApplicationName("AppName"); | |
a.setApplicationVersion("1.0"); |