Skip to content

Instantly share code, notes, and snippets.

@biscuitvile
biscuitvile / lasagna.md
Last active February 18, 2026 17:47
Lasagna

Insane Vegan Lasagna

Lasagna noodles

  • 1 large box

Sauce

  • 2 28oz cans of crushed tomatoes
  • 2 or 3 peppers, get different colors
commit 0767df15ac5e43df7c1e9f92824a51a16c81d404
Author: Andy Borsz <[email protected]>
Date: Wed Nov 19 12:20:32 2014 -0500
Make AccountList more functional
Decouple so extremely from dependencies and pass
them in instead.
diff --git a/app/controllers/support/accounts_controller.rb b/app/controllers/support/accounts_controller.rb
module RSpec
module Rails
# Container module for controller spec functionality.
module ControllerExampleGroup
extend ActiveSupport::Concern
include RSpec::Rails::RailsExampleGroup
include ActionController::TestCase::Behavior
include RSpec::Rails::ViewRendering
include RSpec::Rails::Matchers::RedirectTo
include RSpec::Rails::Matchers::RenderTemplate
@biscuitvile
biscuitvile / mux.md
Created November 5, 2014 03:19
TMUX socket

Me

$ tmux -S /tmp/pair $ chmod 777 /tmp/pair

Another user

$ tmux -S /tmp/pair attach

@biscuitvile
biscuitvile / hell_yes.js
Created October 27, 2014 22:35
Awwwwwwww yea
new Audio('http://123.campfirenow.com/sounds/loggins.mp3').play()
onesies = [
{ :subdomain => 'fortheloveofbikes', :permalink => 'pima-cotton-onesie-6-12-months' },
{ :subdomain => 'chozen', :permalink => 'onezies' },
{ :subdomain => 'seventyfiveapparel', :permalink => 'feather-onesie' },
{ :subdomain => 'dojusticelovemercy', :permalink => 'do-justice-love-mercy-baby-onesie' },
{ :subdomain => 'imsobk', :permalink => 'stacked-pink-tee' },
{ :subdomain => 'feedingtubeawareness', :permalink => 'super-tubie-graduate-infant-onesie-black' },
{ :subdomain => 'feedingtubeawareness', :permalink => 'i-heart-a-tubie-infant-onesie-black' },
{ :subdomain => 'feedingtubeawareness', :permalink => 'super-tubie-infant-onesie-black' },
{ :subdomain => 'jasonmaloneyart', :permalink => 'jason-maloney-x-hurley-kids-chum-onesie-beanie-set' },
it "encrypts a password before save when a password is set" do
account.password = 'password'
mock(PasswordEncryptor).new(account) do
mock!.assign_encrypted_password(account.subdomain).subject
end
account.save
end
class ProductLimitPolicy
def initialize(account)
@account = account
end
def self.allow?(account)
new(account).allow?
end
module RepositionsAccountCollection
def update
if reposition.valid?
reposition.perform and render nothing: true, status: :ok
else
render json: reposition.errors.to_json, status: :unprocessable_entity
end
end
validates_presence_of :password, if: :no_crypted_password?
validates_presence_of :password_confirmation, :if => :password_set?
validates_length_of :password, :within => 4..40, :if => :password_set?
validates_confirmation_of :password, :if => :password_set?