Let's talk about testing.
- Simple recursive-descent parser
- Abstract Syntax Tree (AST) with three node types (Binary, Unary, Atom)
- #evaluate is the only public API on Calc
- parses the input
- evaluates the AST
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
namespace :unicorn do | |
## | |
# Tasks | |
desc "Start unicorn" | |
task(:start) { | |
config = rails_root + "config/unicorn.rb" | |
sh "bundle exec unicorn --daemonize --config-file #{config}" | |
} |
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/ |
#!/usr/bin/env ruby | |
# Author : Emad Elsaid (https://github.com/blazeeboy) | |
require 'gosu' | |
include Gosu | |
DIMENSION, SPLITS, COLOR = 200, 50, Color::GREEN | |
# credits to: http://en.wikipedia.org/wiki/Maze_generation_algorithm | |
class GameWindow < Window | |
def initialize | |
super DIMENSION, DIMENSION, false, 1000 | |
self.caption = "Maze" |
// To run: | |
// npm install globby | |
// node prepend-use-strict.js | |
var globby = require('globby'); | |
var fs = require('fs'); | |
globby('**/*.js', function(err, files) { | |
for (var i = 0, m = files.length; i < m; i++) { | |
var fileContent = fs.readFileSync(files[i]).toString(); |
# rubocop:disable Style/SingleLineMethods | |
require 'nokogiri' | |
class Object; alias try send; end | |
class NilClass; def try(*); nil; end; end |
Product: Sagitta Brutalis 1080 Ti (SKU N4X48-GTX1080TI-2620-128-2X500)
Software: Hashcat 3.5.0-22-gef6467b, Nvidia driver 381.09
Accelerator: 8x Nvidia GTX 1080 Ti Founders Edition
$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.js
diff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644
This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.
Let’s begin.
First of all, there are some concepts that one must unlearn from ipv4:
Concept 1