#Mac OS X
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
| def form &block | |
| puts "<form>" | |
| yield | |
| puts "</form>" | |
| end | |
| def paragraph text | |
| puts "<p>" + text + "</p>" | |
| end |
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
| require "jumpstart_auth" | |
| class MicroBlogger | |
| attr_reader :client | |
| def initialize | |
| puts "Initializing" | |
| @client =JumpstartAuth.twitter |
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
| # Simple, scrappy UDP DNS server in Ruby (with protocol annotations) | |
| # By Peter Cooper | |
| # | |
| # MIT license | |
| # | |
| # * Not advised to use in your production environment! ;-) | |
| # * Requires Ruby 1.9 | |
| # * Supports A and CNAME records | |
| # * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance | |
| # * All records get the same TTL |
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
| git clone http://github.com/isaacs/npm.git | |
| cd npm | |
| sudo make install |
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
| first you must have install xcode and xcode commnand line tool | |
| then we intalll | |
| hombrew The best package management system on Mac OS X for this is | |
| $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
| then we need to install git (i know you have :P ) | |
| $ brew install git |
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
| link_to "View Post", :action => 'show', :controller => 'article', :id => @article | |
| link_to("View Post", {:action => 'show', :controller => 'article', :id => @article}) | |
| <%= link_to "Detail", {:action=> 'detail', :id=> person.id}, :onclick => "javascript:window.open('page.html','popup','width=400,height=200');" %> |
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 | |
| require 'koala' # gem install koala --no-ri --no-rdoc | |
| # create a facebook app and get access token from here | |
| # https://developers.facebook.com/tools/explorer | |
| # select "groups", "photos" when authenticating | |
| oauth_access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
| group_filtering_words = ['ruby'] | |
| image_path = 'image.png' #change to your image path | |
| message = 'My Cool image.' # your message |
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
| #!/bin/bash | |
| # | |
| # DESCRIPTION: | |
| # | |
| # Set the bash prompt according to: | |
| # * the active virtualenv | |
| # * the branch/status of the current git repository | |
| # * the return value of the previous command | |
| # * the fact you just came from Windows and are used to having newlines in | |
| # your prompts. |
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
| #install postgis | |
| brew install postgis | |
| #start virtualenv | |
| #install dependency | |
| #install pil , pillow | |
| #install distribute without version | |
| # setup databage templeate postgis.sh | |
| # setup postgis path into postgis.sh | |
| # fix bug at vintualenv about postgis verison | |
| bug :: django.contrib.gis.geos.error.GEOSException: Could not parse version info string "3.4.2-CAPI-1.8.2 r3921" |
OlderNewer