Run rails new --help
to see all of the options you can use to create a new Rails application:
Output for Rails 8+
Usage:
rails COMMAND [options]
You must specify a command:
Run rails new --help
to see all of the options you can use to create a new Rails application:
Output for Rails 8+
Usage:
rails COMMAND [options]
You must specify a command:
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'colorize' | |
end | |
class MatcherInterface | |
def initialize(some_object) | |
@some_object = some_object |
initialize
: once, when the controller is first instantiatedconnect
: anytime the controller is connected to the DOMThe laptop works well on Archlinux. A few notes based on the installation guide for the previous version.
Per the Arch wiki, more power can be saved by creating /etc/modprobe.d/i915.conf
with the following content:
options i915 modeset=1 enable_rc6=1 enable_fbc=1 enable_guc_loading=1 enable_guc_submission=1 enable_psr=1
defmodule Poker do | |
## Rank a poker hand | |
## | |
## Card is {:suit, value}, e.g. {:heart, 3} | |
## Hand is a list of 5 cards | |
## | |
## Poker.rank [{:heart, 10}, {:club, 11}, {:heart, 9}, {:diamond, 12}, {:heart, 13}] | |
## >> :straight | |
def rank(hand) do |
Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:
Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.
Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.
Instructions provided for both Fedora and Ubuntu (including Debian):
Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:
# This rake will setup the tenant like rails | |
# setup the test database. | |
Rake::Task['db:test:prepare'].enhance do | |
# Connect in the test database. | |
Rails.env = 'test' | |
ActiveRecord::Base.establish_connection('test') | |
Apartment::Tenant.drop('app') rescue nil | |
Apartment::Tenant.create('appp') |
# A little toy file demonstrating how to build chainable | |
# data transformations that reveal some amount of intent | |
# through named extracted methods. | |
# | |
# Kudos to @mfeathers for giving me the idea to try this | |
# | |
# Copyright Test Double, LLC, 2016. All Rights Reserved. | |
require_relative "marketing_refinements" |
set nocompatible " be iMproved, required | |
set number " shows line numbers | |
set relativenumber " show relative line numbers | |
set hlsearch " highlight search results | |
set cursorline " highlight cursor line | |
set laststatus=2 " this is needed for airline | |
set visualbell " no sounds | |
set colorcolumn=80 " column with 80 | |
set wildmode=list " expand and folders/tabs when opening a file | |
set backspace=2 " makes backspace work as it should work |
#!/bin/sh | |
# Call this script as root to fully remove Fuse | |
# For example: 'sudo ./uninstall_fuse.sh' | |
rm -rvf \ | |
/Applications/Fuse.app \ | |
/usr/local/bin/fuse \ | |
/usr/local/bin/uno \ | |
/usr/local/bin/unotest \ |