Local Kubernetes / Deis environment setup (Mac edition)
- Install Kubernetes (minikube)
-
Install VirtualBox or VMWare Fusion
-
Install
minikube:$ brew install minikubeor download the latest release manually
-
Create and start the Kubernetes VM:
-
| name: Rails Tests | |
| on: | |
| pull_request: | |
| git difnches: | |
| - "master" | |
| push: | |
| branches: | |
| - "master" |
| // Copyright 2014 The Flutter Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| import 'dart:async'; | |
| import 'dart:math'; | |
| import 'dart:ui' show lerpDouble, ImageFilter; | |
| import 'package:flutter/cupertino.dart'; | |
| import 'package:flutter/foundation.dart'; |
| # db/migrate/20200119064500_add_position_column_to_active_storage_attachments.rb | |
| class AddPositionColumnToActiveStorageAttachments < ActiveRecord::Migration[6.0] | |
| def change | |
| add_column :active_storage_attachments, :position, :integer, default: 0 | |
| end | |
| end |
| module Cancelable | |
| extend ActiveSupport::Concern | |
| included do | |
| scope :with_cancelled, -> { where.not(cancelled_at: nil) } | |
| scope :not_cancelled, -> { where(cancelled_at: nil) } | |
| def cancel | |
| # Use update_attributes and not touch to trigger after_save |
| # config/initializers/activestorage.rb | |
| Rails.application.config.to_prepare do | |
| # Provides the class-level DSL for declaring that an Active Record model has attached blobs. | |
| ActiveStorage::Attached::Macros.module_eval do | |
| def has_one_attached(name, dependent: :purge_later, acl: :private) | |
| class_eval <<-CODE, __FILE__, __LINE__ + 1 | |
| def #{name} | |
| @active_storage_attached_#{name} ||= ActiveStorage::Attached::One.new("#{name}", self, dependent: #{dependent == :purge_later ? ":purge_later" : "false"}, acl: "#{acl}") | |
| end | |
Install VirtualBox or VMWare Fusion
Install minikube:
$ brew install minikube
or download the latest release manually
Create and start the Kubernetes VM:
| #!/bin/bash | |
| set -o errexit # Always use `errexit` | |
| run_the_cmd && code=$? || code=$? | |
| echo "The exit code was: $code" >&2 |
| require 'pty' | |
| require 'expect' | |
| PTY.spawn('sftp [email protected]:/uploads') do |input, output| | |
| # Say yes to SSH fingerprint | |
| input.expect(/fingerprint/, 2) do |r| | |
| output.puts "yes" if !r.nil? |
| // | |
| // IonIcons+Additions+.h | |
| // Created by Quentin Rousseau on 24/10/14. | |
| // http://quent.in | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import "IonIcons.h" | |
| @interface IonIcons (Additions) |
| // | |
| // STDataStoreController.h | |
| // | |
| // Created by Buzz Andersen on 3/24/11. | |
| // Copyright 2011 System of Touch. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import <CoreData/CoreData.h> |