INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
class Responder: NSObject { | |
@objc func segmentedControlValueChanged(_ sender: UISegmentedControl) { | |
UIView.animate(withDuration: 0.3) { | |
buttonBar.frame.origin.x = (segmentedControl.frame.width / CGFloat(segmentedControl.numberOfSegments)) * CGFloat(segmentedControl.selectedSegmentIndex) | |
} |
// | |
// ParallaxHeader.swift | |
// MealPlanUI | |
// | |
// Created by Simon Ljungberg on 2017-11-15. | |
// Copyright © 2017 Filibaba. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
# Speed things up by not loading Rails env | |
config.assets.initialize_on_precompile = false |
load 'deploy/assets' | |
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
%x{bundle exec rake assets:precompile} | |
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}} | |
%x{bundle exec rake assets:clean} | |
end |
require 'rubygems' | |
require 'pry' | |
$nodes = Hash.new | |
class Index | |
attr_reader :children, :name | |
attr_accessor :parent | |
def initialize(size, name, children = Array.new) |
class AssetsCompiler < Sprockets::StaticCompiler | |
def precompile(paths) | |
ensure_clean_git | |
Rake::Task["assets:clean"].invoke | |
super | |
commit_compiled_assets | |
push | |
end | |
def ensure_clean_git |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
given this inventory.yaml file: | |
``` | |
--- | |
all: | |
children: | |
bastion: | |
hosts: | |
test-bastion-0: | |
swarm_cluster: | |
children: |
## From Lynda.com course 'RSpec Testing Framework with Ruby' | |
describe 'Expectation Matchers' do | |
describe 'equivalence matchers' do | |
it 'will match loose equality with #eq' do | |
a = "2 cats" | |
b = "2 cats" | |
expect(a).to eq(b) |