#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
#!/usr/bin/env ruby | |
require 'base64' | |
require 'nokogiri' | |
require 'uri' | |
def main | |
html = Nokogiri::HTML($stdin.read) | |
inline_all_images(html) | |
inline_all_css(html) |
class TaxCode | |
GENERATORS = { | |
:us => lambda { |id| "US-#{id}" }, | |
:br => lambda { |id| "#{id + 9}-BRA" }, | |
} | |
def self.generate(code, id) | |
gen = GENERATORS[code] || raise ArgumentError, "No generator for country #{code}" | |
gen.call(id) | |
end |
class ApplicationController < ActionController::Base | |
after_action :server_push_headers # https://twitter.com/connorjshea/status/728472354385317888 | |
def server_push_headers | |
# CLoudflare HTTP2 Server Push: https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/ | |
if request.format.html? # only on html pages | |
layout = self.send(:_layout) # with the right layout | |
if layout == "main" || layout == "speaker" || layout == "admin" | |
assets = [ |
#OSX Tweaks: | |
=========== | |
- Most need reboot to show changes | |
- Most of these tweaks are just for speed, but some are specific for development | |
- All of these are to be ran in terminal. The commands to be copy and pasted start after the less-than sign. | |
- I'm not responsible for any adverse effects to your computer, at all. | |
##Increase the speed of OS X dialogs boxes: |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
Options included below:
docker-compose
brew
This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew
any longer. Instead consider adding a barebones docker-compose.yml
for each project and run docker-compose up
to start each project's mysql service.
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
# Piece-by-Piece Explanation: | |
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
# the $PROMPT_COMMAND environment variable is executed every time a command is run | |
# see: ss64.com/bash/syntax-prompt.html |
Lets assume you have 3 managers and 3 workers on 17.06 and you want to update to 17.12
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
I am not liable for any damages/loss of data.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions
(HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".