Skip to content

Instantly share code, notes, and snippets.

View joseph-ravenwolfe's full-sized avatar
🚀

Joseph Ravenwolfe joseph-ravenwolfe

🚀
View GitHub Profile
@joseph-ravenwolfe
joseph-ravenwolfe / install_go_on_apple_silicon_arm_m1.md
Created December 18, 2020 23:35
Install Go on Apple Silicon ARM M1

Install Go (v1.16beta) on Apple Silicon, use with Homebrew

Go is not available to install via Homebrew at the time of this writing. (Dec 18th 2020)

Go v1.16 will ship with Apple Silicon support in February of 2021, however the Go 1.16 beta can be installed from the Go website and can be linked to brew so that other brew packages that depend on Go may use it.

  1. Install go1.16beta1.darwin-arm64.pkg.
  2. Run mkdir /opt/homebrew/Cellar/go
  3. Create a symlink to the Go v1.16 pkg installation with ln -s /usr/local/go /opt/homebrew/Cellar/go/1.16
  4. Run brew link go
Log In Page
Log-in -> Upload Page
Upload Page
Find Files to Upload
Drop Files and Forget -> Upload Configuration
Upload Configuration
Search Page
Small Search Box
On Click -> Expanded Search
Expanded Search
Enter Text -> Category Suggestions
Press Escape -> Small Search Box
All Categories
Category Suggestions
Select Category -> Field Suggestions
Continue Typing -> Category Suggestions
User
Site
# A good use case would be allowing an object to compare itself to another instance
class Country
attrs :name, :coordinates
def overlapping?(other)
self.coordinates_as_array.include?(other.coordinates_as_array)
end
protected

Pattern 1

# Bad
class Person
  def be_polite(big_favor)
    if big_favor
      'Thank you very much'
    else
      'Thank you'
@joseph-ravenwolfe
joseph-ravenwolfe / request.md
Created November 11, 2015 22:40 — forked from nilbus/request.md
Proposed changes to tcrayford/Values

This gem is great. Thanks for releasing it!

We're running into 2 issues using Values, however.

  1. Inheritance from other classes is impossible
  2. No support for optional arguments to ValueClass.with

What I'm suggesting is a significant deviation from current usage and would require a major version release. That said, I think the benefits are worth it. Please review these ideas, and let me know if you would consider accepting future Pull Requests for these changes into the project, providing that the changes are simple and elegant enough to stay in line with the project's goal for simplicity. If not, we'll fork and release under a different name.

Inheritance

def performance
stores = {1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0}
stores.keys.each do |store_number|
print "Please enter the amount for store #{store_number}: "
stores[store_number] = (gets.chomp.to_i / 100).floor
end
puts "Sales Bar Chart"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""" SYSTEM """"""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " DO NOT USE VI
set rtp+=~/.vim/bundle/vundle/ " SET VUNDLER PATH
call vundle#rc() " USE VUNDLER
set shell=/bin/bash " FIX RVM
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""" GITHUB BUNDLES """"""""""""""""""""""""""""""""
@joseph-ravenwolfe
joseph-ravenwolfe / 20131208171336_create_roles.rb
Last active December 30, 2015 17:59
Adding Dynamic Roles to Users
# db/migrate/20131208171336_create_roles.rb
class CreateRoles < ActiveRecord::Migration
def change
create_table :roles do |t|
t.string :name
t.timestamps
end
end
end