Skip to content

Instantly share code, notes, and snippets.

View hipertracker's full-sized avatar

Jaroslaw Zabiello hipertracker

View GitHub Profile
Simple accessors
<?php
error_reporting(E_ALL);
class NoMethodException extends Exception {}
class NoPropertyException extends Exception {}
/**
* class Example documentation
@hipertracker
hipertracker / gist:54250
Created January 28, 2009 23:27
Netbeans configuration file
# netbeans.conf
# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/.netbeans/6.7m2"
# Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options="-J-Dorg.glassfish.v3.installRoot=/Applications/NetBeans/glassfish-v3-prelude-b28c -J-Dcom.sun.aas.installRoot=/Applications/NetBeans/glassfish-v2.1 -J-Dorg.glassfish.v3.installRoot=/Applications/NetBeans/glassfish-v3-prelude-b28c -J-Dcom.sun.aas.installRoot=/Applications/NetBeans/glassfish-v2.1 -J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"
# Note that a default -Xmx is selected for you automatically.
# You can find this value in var/log/messages.log file in your userdir.
# /opt/ruby-1.9.1/bin/gem install merb
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Error installing merb:
ERROR: Failed to build gem native extension.
/opt/ruby-1.9.1/bin/ruby extconf.rb install merb
creating Makefile
make
# http://confluence.concord.org/display/CCTR/Comparison+of+Ruby+1.8.6+1.9+and+JRuby+running+on+Java+1.5+1.6+and+1.7
#!/usr/bin/env ruby
#
# Ruby 1.8.6, 1.9, and JRuby running on Java 1.5, 1.6, and 1.7 compared
#
# Stephen Bannasch, Feb 4, 2009
#
# mergesort benchmark adapted from:
#
PHP5 Properties example
<?php
error_reporting(E_ALL);
class TypeMismatchException extends Exception {}
class PropertyText {
private $content = '';
private $valid_for = array('min' => 1, 'max' => 255); // default
private $error_message = '';
$ merb-gen core merb_on_ruby19
/opt/local/lib/ruby1.9/gems/1.9.1/gems/merb-core-1.0.9/lib/merb-core/dispatch/router/behavior.rb:18: warning: undefining `object_id' may cause serious problem
/opt/local/lib/ruby1.9/gems/1.9.1/gems/merb-core-1.0.9/lib/merb-core/dispatch/router/behavior.rb:18: warning: undefining `__send__' may cause serious problem
/opt/local/lib/ruby1.9/gems/1.9.1/gems/templater-0.5.0/lib/templater/core_ext/string.rb:5:in `realign_indentation': undefined method `to_a' for #<String:0x7504f4> (NoMethodError)
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/templater-0.5.0/lib/templater/manifold.rb:93:in `desc'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/merb-gen-1.0.9/lib/merb-gen/generator.rb:26:in `<module:Generators>'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/merb-gen-1.0.9/lib/merb-gen/generator.rb:20:in `<module:Merb>'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/merb-gen-1.0.9/lib/merb-gen/generator.rb:1:in `<top (required)>'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/merb-gen-1.0
sudo gem1.9 install dbd-mysql -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config
Building native extensions. This could take a while...
ERROR: Error installing dbd-mysql:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby1.9 extconf.rb install dbd-mysql -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
creating Makefile
$ sudo gem1.9 install ruby-xquery
Building native extensions. This could take a while...
ERROR: Error installing ruby-xquery:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby1.9 extconf.rb install ruby-xquery
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... no
checking for atan() in -lm... yes
$ sudo gem1.9 install ruby-xquery
Building native extensions. This could take a while...
ERROR: Error installing ruby-xquery:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby1.9 extconf.rb install ruby-xquery
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... no
checking for atan() in -lm... yes
spec = Gem::Specification.new do |s|
s.name = "json"
s.version = "1.1.3"
s.summary = "this fakes json (which is now included in stdlib)"
s.homepage = "http://json.rubyforge.org/"
s.has_rdoc = false
s.required_ruby_version = '>= 1.9.1'
end