Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'bundler' | |
| require 'fileutils' | |
| require 'net/http' | |
| require 'net/https' | |
| require 'uri' | |
| TMP_DIR = "/tmp/gems" |
| server { | |
| listen 80; | |
| server_name nagios.example.tld; | |
| access_log /var/log/nginx/nagios.access.log; | |
| error_log /var/log/nginx/nagios.error.log info; | |
| expires 31d; | |
| root /usr/share/nagios3/htdocs; |
| class LintTest < ActiveSupport::TestCase | |
| include ActiveModel::Lint::Tests | |
| class Model | |
| # model.to_model | |
| include ActiveModel::Conversion | |
| # Implements Model.model_name | |
| extend ActiveModel::Naming |
| <html> | |
| <body> | |
| <form onsubmit="return saveText()"> | |
| <label for="name">Name</label><br> | |
| <input id="name" /><br> | |
| <label for="desc">Description</label><br> | |
| <input id="desc" /><br> | |
| <input type="submit" value="Save" /> |
| /* to use WebSQL or the SQLite plugin (https://github.com/davibe/Phonegap-SQLitePlugin) with the same function) */ | |
| executeSqlBridge: function(tx, sql, params, dataHandler, errorHandler) { | |
| var self = this; | |
| if (typeof self.db.dbPath !== 'undefined') { | |
| //Native SQLite DB with phonegap : https://github.com/davibe/Phonegap-SQLitePlugin/ | |
| //this is a native DB, the method signature is different: | |
| var sqlAndParams = [sql].concat(params); | |
| var cb = function(res) { |
| // Media Queries in Sass 3.2 | |
| // | |
| // These mixins make media queries a breeze with Sass. | |
| // The media queries from mobile up until desktop all | |
| // trigger at different points along the way | |
| // | |
| // And important point to remember is that and width | |
| // over the portrait width is considered to be part of the | |
| // landscape width. This allows us to capture widths of devices | |
| // that might not fit the dimensions exactly. This means the break |
| desc "convert a latin1 database with utf8 data into proper utf8" | |
| task :convert_to_utf8 => :environment do | |
| puts Time.now | |
| dryrun = ENV['DOIT'] != '1' | |
| conn = ActiveRecord::Base.connection | |
| if dryrun | |
| def conn.run_sql(sql) | |
| puts(sql) | |
| end | |
| else |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Node struct { | |
| Value int | |
| } |