Run the following commands from the project dir:
$ qmake -project && qmake && make
| class UsersController < ApplicationController | |
| def new | |
| @user = User.new | |
| end | |
| def create | |
| user = User.new(params[:user]) | |
| user.save # breaks the: "creates a new user with the given attributes" with error: Mock "User_1001" received unexpected message :save with (no args) | |
| render :nothing => true | |
| end |
| Section "Monitor" | |
| Identifier "Monitor0" | |
| EndSection | |
| Section "Device" | |
| Identifier "Device0" | |
| Driver "vesa" # driver | |
| EndSection | |
| Section "Screen" |
| class Model | |
| def self.all | |
| puts self.table | |
| end | |
| class << self | |
| attr_reader :table | |
| end | |
| end |
Install Cask (w/ home brew)
brew install caskroom/cask/brew-cask
Install VirtualBox
brew cask install virtualbox
| 10:32 [~] $ cd /tmp/ | |
| 10:32 [tmp] $ mkdir -p eka/toka/kolmas | |
| 10:32 [tmp] $ pushd eka/ | |
| /tmp/eka /tmp | |
| 10:33 [eka] $ pushd toka/ | |
| /tmp/eka/toka /tmp/eka /tmp | |
| 10:33 [toka] $ pushd kolmas/ | |
| /tmp/eka/toka/kolmas /tmp/eka/toka /tmp/eka /tmp | |
| 10:33 [kolmas] $ pwd | |
| /tmp/eka/toka/kolmas |
| var gulp = require('gulp'); | |
| var browserify = require('browserify'); | |
| var source = require('vinyl-source-stream'); | |
| gulp.task('js', function () { | |
| return browserify('./src/js/application.js', { debug: true }) | |
| .bundle().on('error', handleError) | |
| .pipe(source('application.js')) | |
| .pipe(gulp.dest('./js')); | |
| }); |
| var pg = require('pg'); | |
| var dcs = process.env['DATABASE_URL']; | |
| function exec(sql, binds) { | |
| return new Promise(function (resolve, reject) { | |
| pg.connect(dcs, function connect(err, db, release) { | |
| if (err) { | |
| reject(err); | |
| } |
| function lupaa(cond) { | |
| return new Promise(function (resolve, reject) { | |
| if (cond) { | |
| resolve('Tuli'); | |
| } | |
| reject('Meni'); | |
| }); | |
| } |
| $ ruby threadit.rb | |
| > 2 | |
| > 1 | |
| > 0 | |
| > 3 | |
| > 4 | |
| > 5 | |
| > 6 | |
| 2 < | |
| 0 < |