Skip to content

Instantly share code, notes, and snippets.

Avatar

Joseph DelCioppio thedelchop

View GitHub Profile
@thedelchop
thedelchop / dracula.vim
Created May 10, 2019
Dracula SpaceVim Theme
View dracula.vim
"=============================================================================
" dracula.vim --- dracula theme for SpaceVim
" Author: Joseph DelCioppio < joseph.delcioppio@gmail.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
" The default color palette that Dracula.vim exports
" {
" 'bgdarker': ['#191A21', 234],
" 'bgdark': ['#21222C', 235],
@thedelchop
thedelchop / companies.txt
Created Oct 21, 2016
List of companies affected by today's DDOS attack
View companies.txt
ActBlue
Basecamp
Big cartel
Box
Business Insider
CNN
Cleveland.com
Etsy
Github
Grubhub
@thedelchop
thedelchop / RegistrationsController
Last active Jan 15, 2016
A controller that can not be extended without being modified
View RegistrationsController
class RegistrationsController < ApplicationController
def create
# Some logic to sign up
render json: @user, each_serializer: UserSerializer
end
end
View collection_question.coffee
collection = new Backbone.Collection([{id: 1, name: 'bar'}, {id: 2, name: 'foo'}])
firstModelInstance = collection.findWhere({id: 1})
firstModelInstance.on 'testEvent', ->
console.log 'Does this get run?'
firstModelInstance = undefined
View Failing Specs
3) Streetstyle when keywords is not nil adds source_name to keywords after source_name is set
Failure/Error: streetstyle.keywords.should == 'red My Blog'
expected: "red My Blog"
got: "red" (using ==)
# ./spec/models/streetstyle_spec.rb:16:in `block (3 levels) in <top (required)>'
View Bash output
webpack app/js/entrypoint.coffee generated/webpack.js -d ● webpack-conversion@8f473d9
Hash: c18c8e88db17da071caa
Version: webpack 1.4.5
Time: 57ms
Asset Size Chunks Chunk Names
webpack.js 2041 0 [emitted] main
webpack.js.map 1749 0 [emitted] main
[0] ./app/js/entrypoint.coffee 118 {0} [built] [2 errors]
[1] ./app/js/closetspace/closetspace.coffee -1 [built] [failed]
[2] ./app/js/closetspace/router.coffee -1 [built] [failed]
View follow.rb
def notify_user
Notification.create text: text do |notification|
notificaiton.user = followed_user
notification.notable = user
end
end
@thedelchop
thedelchop / acceptance_spec_helper.rb
Created May 8, 2013
These are my two spec_helper files for the suite
View acceptance_spec_helper.rb
require "capybara/rspec"
require 'rspec/example_steps'
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
require File.expand_path(File.dirname(__FILE__) + "/support/helpers")
require File.expand_path(File.dirname(__FILE__) + "/support/paths")
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
include ApplicationHelper
include HelperMethods
include FacebookAuthHelper
@thedelchop
thedelchop / .rspec
Created Dec 3, 2012
Here is the TmuxNotifier and the .rspec changes needed to use it.
View .rspec
--color -f TmuxNotifier
@thedelchop
thedelchop / polite_remittance_slip.rb
Created Sep 28, 2012
Old code that was hard to read and NOT polite
View polite_remittance_slip.rb
module DEFT
class RemittanceSlip
def initialize(*credits)
@credits = credits
end
def print
output = print_header_record