Open terminal and type:
1. Create a directory at ~/bin:
mkdir ~/bin
2. Copy sublime executable to your ~/bin directory:
| Tested on: Datatable 1.8.2, Rails 3.1.3 | |
| This example uses Coffeescript and Haml (you should too :-) ) | |
| The following is an example of Datatables server-side processing of a table | |
| which displays a user's song list including the songs' artist names. In | |
| Rails, Song and Artist are ActiveRecord models in a one artist-many song relat. | |
| 1a. the Rails controller code | |
| class SongsController < ApplicationController |
| Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
| (if you aren't using version 9.1.5, change line 6 with the correct version) | |
| 1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| 2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
| 3. brew update | |
| 4. brew upgrade postgresql | |
| 5. initdb /usr/local/var/postgres -E utf8 | |
| 6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
| 7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
| %{TIMESTAMP_ISO8601:timestamp} %{IP:sourceip} %{WORD:method} %{URIPATH:uristem} (?:-|%{NOTSPACE:uriquery}) %{POSINT:port} (?:-|%{NOTSPACE:username}) %{IP:clientip} %{NOTSPACE:useragent} %{NUMBER:status} %{NUMBER:substatus} %{NUMBER:win32status} %{NUMBER:timetaken} |
| # config/initializers/web_console.rb | |
| WebConsoleBeforeAction = ->(controller) do | |
| controller.console if controller.params[:web_console] | |
| end | |
| ApplicationController.before_action(WebConsoleBeforeAction) if defined?(WebConsole) && Rails.env.development? | |
| # NOTE: | |
| # For security reasons only do this in development. |
This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.
No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!
I chose [pgloader][1] because it's extremely fast. YMMV.
mysql2 gem with pg in Gemfile.config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.| /*<?php | |
| //*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
| //\u000A\u002F\u002A | |
| class PhpJava { | |
| static function main() { | |
| echo(//\u000A\u002A\u002F | |
| "Hello World!"); | |
| }} | |
| //\u000A\u002F\u002A | |
| PhpJava::main(); |