Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
#include "mruby.h" | |
#include "mruby/string.h" | |
#include "mruby/array.h" | |
mrb_value | |
migrate_simple_value(mrb_state *mrb, mrb_value v, mrb_state *mrb2) | |
{ | |
mrb_value nv; /* new value */ | |
const char *s; | |
int len; |
test: test_c.o test_d.o | |
cc -shared -m32 test_c.o test_d.o -o test.so -lphobos2 | |
test_c.o: test.c | |
gcc -c -m32 test.c -o test_c.o | |
test_d.o: test.d | |
dmd -c -m32 test.d -oftest_d.o |
require 'sinatra/base' | |
require 'ostruct' | |
dummy = OpenStruct.new :template_cache => Tilt::Cache.new, :settings => Sinatra::Base | |
dummy.extend Sinatra::Templates | |
puts dummy.markdown('# hi') |
Link: http://blog.therubymug.com/blog/2011/07/26/the-install-osx-lion.html
brew update && brew upgrade
rvm update --head rvm reload rvm repair all
gem pristine
#put into the padrino boot.rb file before Padrino.load! | |
module Padrino | |
module Admin | |
module AccessControl | |
class Base | |
## | |
# Return an array of project_modules | |
# | |
def project_modules(account) | |
roles = account.roles if account.roles.kind_of?(Array) rescue [] |
" Search for mkdCode and throw this in there where you like...I did on line 72 | |
syn region mkdCode start=/^``[^`]*/ end=/[^`]*``.*/ |
alias rake="time rake" | |
# Run `padrino rake` when inside a padrino project, | |
# otherwise run the normal rake command. | |
function rake () { | |
if [[ -f ".components" ]]; then | |
padrino rake $* | |
else | |
ruby -S rake $* | |
fi |
# !/usr/bin/env ruby | |
# USAGE | |
# sudo killmatch Rails | |
unless ARGV[0] | |
puts "Specify a pattern to kill! i.e killmatch Rails" | |
exit | |
end |
#!/usr/bin/env macruby | |
framework 'AppKit' | |
# Inspired by: http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html | |
# Inits NSApp | |
NSApplication.sharedApplication | |
# Allows an app without an applicaiton bundle or info.plist to still be an app |