A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.
This was written in 2014. It is not a good reference for Rust today, though the content is still correct.
cheats.rs looks like a good alternative.
| # Basic key operators to query the JSON objects : | |
| # #> : Get the JSON object at that path (if you need to do something fancy) | |
| # -> : Get the JSON object at that path (if you don't) | |
| # ->> : Get the JSON object at that path as text | |
| # {obj, n} : Get the nth item in that object | |
| # https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE | |
| # Date | |
| # date before today |
A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.
This was written in 2014. It is not a good reference for Rust today, though the content is still correct.
cheats.rs looks like a good alternative.
| sasha:rubinius brian$ rbx compile -A -e " | |
| class Foo | |
| include Module.new { | |
| def this_works | |
| end | |
| } | |
| include Module.new do | |
| def this_doesnt_work | |
| end |
| require 'minitest/autorun' | |
| ### | |
| # Test to demonstrate TCO in Ruby. Tested in 1.9.2+ | |
| class TestTCO < MiniTest::Unit::TestCase | |
| code = <<-eocode | |
| class Facts | |
| def fact_helper(n, res) | |
| if n == 1 | |
| res |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using Vagrant. This took me a while to figure out:
Add the default lucid32 base box to your vagrant, if you haven't already:
host> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
Now make a new lucid32 virtual machine and install postgresql on it: