Here I'm trying to understand what happens when I run
./hello
#include Here I'm trying to understand what happens when I run
./hello
#include | require 'tmpdir' | |
| # Usage: | |
| # add to ruhoh-site/plugins/publish/github.rb | |
| # - Your GitHub remote must be setup properly but The command will try to walk you through it. | |
| # - You must have a clean working directory to publish to GitHub pages since the hook is actually triggered by commits. | |
| # | |
| # $ cd ruhoh-site | |
| # $ bundle exec ruhoh publish github | |
| class Ruhoh |
| # Borrowed from https://github.com/y310/rspec-retry/blob/master/lib/rspec/retry.rb | |
| CAPYBARA_TIMEOUT_RETRIES = 3 | |
| RSpec.configure do |config| | |
| config.around(:each, type: :feature) do |ex| | |
| example = RSpec.current_example | |
| CAPYBARA_TIMEOUT_RETRIES.times do |i| | |
| example.instance_variable_set('@exception', nil) | |
| self.instance_variable_set('@__memoized', nil) # clear let variables |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
by Keith Rosenberg (netpoetica)
Note: do this in some sort of project/ directory that makes sense. depot_tools are going to need to be in your path, so you may want to install them somewhere you are comfortable with.
git clone https://github.com/v8/v8.git
| # swith to sudo | |
| sudo -i | |
| # create swap | |
| touch /2GiB.swap | |
| chattr +C /2GiB.swap | |
| fallocate -l 2048m /2GiB.swap | |
| chmod 600 /2GiB.swap | |
| mkswap /2GiB.swap |
| # DCI EXAMPLE IN RUBY (with some prototype elements) | |
| # Blog post: https://www.ludyna.com/oleh/dci-example-in-ruby | |
| # | |
| # More info: | |
| # | |
| # Creator of MVC & DCI, Trygve Reenskaug: DCI: Re-thinking the foundations of | |
| # object orientation and of programming | |
| # http://vimeo.com/8235394 | |
| # | |
| # James Coplien: Why DCI is the Right Architecture for Right Now |
| " run command | |
| " no stdin | |
| " output displayed in "Press enter to continue" style | |
| " current buffer untouched | |
| :!uptime | |
| " run command | |
| " pipe range of text to command on stdin | |
| " output replaces the range in the current buffer | |
| :RANGE!grep foo |
| 'use strict'; | |
| module.exports = function CustomError(message, extra) { | |
| Error.captureStackTrace(this, this.constructor); | |
| this.name = this.constructor.name; | |
| this.message = message; | |
| this.extra = extra; | |
| }; | |
| require('util').inherits(module.exports, Error); |