Skip to content

Instantly share code, notes, and snippets.

View msuzoagu's full-sized avatar

MUA msuzoagu

  • Space
View GitHub Profile
//: 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
@msuzoagu
msuzoagu / sampleREADME.md
Created June 3, 2020 23:40 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@msuzoagu
msuzoagu / application.rb
Created August 24, 2019 00:10 — forked from keighl/application.rb
Faster Rails asset precompilation via Capistrano .. just do it locally!
# Speed things up by not loading Rails env
config.assets.initialize_on_precompile = false
@msuzoagu
msuzoagu / deploy.rb
Created August 24, 2019 00:10 — forked from uhlenbrock/deploy.rb
Precompile assets locally for Capistrano deploy
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)
@msuzoagu
msuzoagu / custom_compiler.rb
Created August 24, 2019 00:08 — forked from guilleiguaran/custom_compiler.rb
Compile assets and push them automatically when run rake assets:precompile
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
@msuzoagu
msuzoagu / nginxproxy.md
Created May 21, 2019 14:38 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

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

@msuzoagu
msuzoagu / gist:a8e3d46c174182e4fce997b576130155
Created March 14, 2019 23:41
for ansible issue concerning stacked SSH host key prompts
given this inventory.yaml file:
```
---
all:
children:
bastion:
hosts:
test-bastion-0:
swarm_cluster:
children:
@msuzoagu
msuzoagu / gist:ea854a6f74b743bc1c5d8ffc8e96e2e3
Created January 14, 2018 10:16 — forked from hpjaj/gist:ef5ba70a938a963332d0
RSpec - List of available Expectation Matchers - from Lynda.com course 'RSpec Testing Framework with Ruby'
## 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)