Skip to content

Instantly share code, notes, and snippets.

View railsfactory's full-sized avatar

RailsFactory railsfactory

View GitHub Profile
@railsfactory
railsfactory / .irbrc
Created May 17, 2011 07:46
.irbrc rails 3 compatible
require 'rubygems' rescue nil
require 'wirble'
require 'pp'
# load wirble
Wirble.init
Wirble.colorize
IRB.conf[:AUTO_INDENT] = true
@railsfactory
railsfactory / apple.mirah
Created May 16, 2011 15:04
getting mirah code to work on play framework
package controllers;
import play.*;
import play.mvc.*;
import java.util.*;
import models.*;
# # original java code which works
#public class Apple extends Controller {
#
@railsfactory
railsfactory / gist:964985
Created May 10, 2011 17:49
Microsoft Risk Factors
Microsoft Risk Factors taken from http://www.microsoft.com/Presspass/press/2011/may11/05-10CorpNewsPR.mspx
added competitors who can create this risk
• Execution and competitive risks in transitioning to cloud-based computing;
amazon web services,vmware,force.com, etc
• Challenges to Microsoft’s business model;
Windows OS, Microsoft Office, enterprise desktop and server software which thrive on licensing is doomed
if I try exception handling
Exception in thread "main" java.lang.VerifyError: (class: mirah/MString, method: to_i signature: ()I) Mismatched stack types
at Usage.main(usage.mirah:2)
if I dont use exception
@railsfactory
railsfactory / baz.mirah
Created April 26, 2011 17:26
mirah import example
#in bar folder
class Bar
class Baz
def hello
puts "hello from Baz"
end
end
end
@railsfactory
railsfactory / path error
Created April 23, 2011 19:17
getting started on dubious
if I copy the application controlled code in my hello controller and run the code, app seems to boot and stops without any errors
import dubious.*
import models.*
class ApplicationController < ActionController
end
class HelloController < ApplicationController
@railsfactory
railsfactory / compile error
Created April 9, 2011 11:26
script to parse stdin
Senthil-3:stdin senthil$ mirahc parse.mirah
Parsing...
parse.mirah
Inferring types...
Inference Error:
parse.mirah:7: Cannot find class InputStreamReader
inStream = InputStreamReader.new(System.in)
^^^^^^^^^^^^^^^^^^
parse.mirah:8: Cannot find class BufferedReader
stdin = BufferedReader.new(inStream)
Senthil-3:rsdl-0.1.4 senthil$ sudo port install libsdl libsdl_gfx libsdl_image libsdl_mixer libsdl_ttf
---> Computing dependencies for libsdl
---> Dependencies to be installed: xorg-libXext pkgconfig xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb python27 bzip2 db46 gdbm gettext expat libiconv gperf ncurses ncursesw openssl zlib readline sqlite3 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXrandr xorg-randrproto xrender xorg-renderproto
---> Fetching pkgconfig
---> Attempting to fetch pkg-config-0.25.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/pkgconfig
---> Verifying checksum(s) for pkgconfig
---> Extracting pkgconfig
---> Applying patches to pkgconfig
---> Configuring pkgconfig
---> Building pkgconfig
iphone apps which I use for my kids
2-3 year old
~~~~~~~~~~~~~
eliasZoo -> animated animals with sound
first words -> spelling
mTamil -> tamil letters
git pull
git checkout -b checking2810
git apply ~/2810add_order_option_to_with_scope.diff
error: patch failed: activerecord/lib/active_record/base.rb:401
error: activerecord/lib/active_record/base.rb: patch does not apply
error: patch failed: activerecord/test/cases/method_scoping_test.rb:657
error: activerecord/test/cases/method_scoping_test.rb: patch does not apply