Skip to content

Instantly share code, notes, and snippets.

View MikeRogers0's full-sized avatar
🚂

Mike Rogers MikeRogers0

🚂
View GitHub Profile
$ brew tap MikeRogers0/homebrew-sass
==> Tapping mikerogers0/sass
Cloning into '/usr/local/Homebrew/Library/Taps/mikerogers0/homebrew-sass'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
Tapped 1 formula (28 files, 22.5KB)
Mike at Michaels-MacBook-Pro in ~
$ brew install sass/sass/sass
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (sass/sass).
No changes to formulae.
==> Installing sass from sass/sass
==> Downloading https://github.com/sass/dart-sass/archive/1.4.0.tar.gz
Already downloaded: /Users/Mike/Library/Caches/Homebrew/sass-1.4.0.tar.gz
==> /usr/local/opt/dart/bin/pub get
$ brew install sass/sass/sass
Updating Homebrew...
==> Migrating tap caskroom/cask to homebrew/cask...
Moving /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask to /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Changing remote from https://github.com/caskroom/homebrew-cask to https://github.com/Homebrew/homebrew-cask...
==> Auto-updated Homebrew!
Updated 4 taps (heroku/brew, homebrew/core, homebrew/php, homebrew/cask).
==> New Formulae
bitwarden-cli clozure-cl density howard-hinnant-date kubecfg mk-configure soundpipe vsts-cli
brew-php-switcher confluent-oss fortio kakoune libheif pygitup taskell
@MikeRogers0
MikeRogers0 / setup_puma_dev.local
Created September 23, 2017 13:58
Setup Puma Dev
brew install puma/puma/puma-dev &&
sudo puma-dev -setup &&
puma-dev -install &&
security add-trusted-cert -k login.keychain-db ~/Library/Application\ Support/io.puma.dev/cert.pem
@MikeRogers0
MikeRogers0 / migration-from-pow-to-puma-dev.bash
Last active September 23, 2017 14:16
Migrate from Pow to puma-dev
curl get.pow.cx/uninstall.sh | sh &&
brew install puma/puma/puma-dev &&
sudo puma-dev -setup &&
puma-dev -install &&
security add-trusted-cert -k login.keychain-db ~/Library/Application\ Support/io.puma.dev/cert.pem &&
mv ~/.pow/* ~/.puma-dev
@MikeRogers0
MikeRogers0 / 0-readme.md
Last active May 23, 2016 21:00
Some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].

For Citrusbyte.

I wrote these two methods using Ruby 2.3.1, the tests require the minitest gem to be installed on your system.

You can run the tests using the command

ruby flatten_recursion_test.rb ruby flatten_regex_test.rb

Here is a summary of the two methods:

@MikeRogers0
MikeRogers0 / application.html.erb
Created May 24, 2015 18:36
Example of how yield works
<%= yeild :some_content %>
@MikeRogers0
MikeRogers0 / example_output.txt
Last active March 30, 2017 20:05
Setting up Oink to run after my test suite
Mikes-Mac-Pro:ExampleApp MikeRogers$ fr rspec
....................................................................................................
---- MEMORY THRESHOLD ----
THRESHOLD: 1 MB
-- SUMMARY --
Worst Requests:
1. Mar 27 14:14:13, 18432 KB, home#index
2. Mar 27 14:14:12, 16384 KB, contact_us#create
3. Mar 27 14:14:08, 6072 KB, contact_us#create
@MikeRogers0
MikeRogers0 / Gemfile
Created March 16, 2015 18:05
Gem rake group example
ruby '2.2.1'
source 'https://rails-assets.org' do
gem 'rails-assets-bootstrap'
end
source 'https://rubygems.org' do
gem 'rails', '4.2'
# Database / Memcache / Solr
@MikeRogers0
MikeRogers0 / seeds.rb
Created January 27, 2015 13:52
The methods I use with seedbank to easily add new seeds with a nice message.
class Seeds
def self.add model, attrs
object = model.find_or_initialize_by(attrs)
if object.new_record? && object.save
puts "#{object}"
end
end
end