This file contains 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
(or (fboundp 'declare-function) | |
;; taken from Emacs 22.2, not present in 22.1: | |
(defmacro declare-function (&rest args) | |
"In Emacs 22, does nothing. In 23, it will suppress byte-compiler warnings. | |
This definition is so that packages may take advantage of the | |
Emacs 23 feature and still remain compatible with Emacs 22." | |
nil)) |
This file contains 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
Getting org.scala-tools.sbt sbt_2.8.1 0.7.4 ... | |
:: problems summary :: | |
:::: WARNINGS | |
module not found: org.scala-tools.sbt#sbt_2.8.1;0.7.4 | |
==== local: tried | |
/Users/iokpala/.ivy2/local/org.scala-tools.sbt/sbt_2.8.1/0.7.4/ivys/ivy.xml |
This file contains 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
ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" #install brew | |
brew install mysql | |
unset TMPDIR | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
sudo cp /usr/local/Cellar/mysql/5.5.10/com.mysql.mysqld.plist /Library/LaunchDaemons/ |
This file contains 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
class Multiplier | |
def self.make_multiplier(n) | |
define_method("times_#{n}") do |val| | |
val * n | |
end | |
end | |
100.times do |n| | |
make_multiplier(n) |
This file contains 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
!!! | |
%html | |
%head | |
%title | |
= csrf_meta_tag | |
= stylesheet_link_tag "layout" | |
%script{:src=>"http://www.google.com/jsapi", :type=>"text/javascript"} | |
%script{:type=>"text/javascript"} | |
google.load("chrome-frame", "1.0.2"); | |
google.load("dojo", "1.6.1"); |
This file contains 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
<% extras = ::Rails.env == "development" ? "{ uncompressed: true }": "{}" %> | |
if (typeof google === 'undefined' || google == "" ) { | |
scriptTag = createScriptTag(); | |
insertScriptTag(scriptTag); | |
console.dir(this) | |
} else { | |
google.load("jquery", "1.6.4", <%= extras %>); | |
google.load("jqueryui", "1.8.0", <%= extras %>); | |
} |
This file contains 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
<form action="#" id="searchform" method="post" name="searchform"> | |
<input class="field" id="searchtxt" name="searchtxt" size="" tabindex="" type="" value="Search" style="width: 70px; "> | |
<input class="bt_go" id="submitbtn" name="submitbtn" size="" tabindex="" type="submit" value=""> | |
</form> |
This file contains 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
module A | |
METHODS = [:mix_me] | |
def self.included(base) | |
base.send(:include, A::B) | |
end | |
module B | |
def hello(name) | |
puts "HELLO #{name}" | |
end |
This file contains 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
# Steps to install RVM + Ruby 1.9.2 + Rails + nginx + Passenger on CentOS (tested on v5.5) | |
# Install git and curl, if not already installed | |
sudo yum install git | |
sudo yum install curl | |
# Create the rvm group and add any users who will be using rvm to the group | |
sudo su - | |
groupadd rvm |
This file contains 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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |