Skip to content

Instantly share code, notes, and snippets.

View thedelchop's full-sized avatar

Joseph DelCioppio thedelchop

View GitHub Profile
@thedelchop
thedelchop / dracula.vim
Created May 10, 2019 14:20
Dracula SpaceVim Theme
"=============================================================================
" 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 October 21, 2016 23:20
List of companies affected by today's DDOS attack
ActBlue
Basecamp
Big cartel
Box
Business Insider
CNN
Cleveland.com
Etsy
Github
Grubhub
@thedelchop
thedelchop / RegistrationsController
Last active January 15, 2016 16:09
A controller that can not be extended without being modified
class RegistrationsController < ApplicationController
def create
# Some logic to sign up
render json: @user, each_serializer: UserSerializer
end
end
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
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)>'
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]
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 16:41
These are my two spec_helper files for the suite
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 December 3, 2012 15:40
Here is the TmuxNotifier and the .rspec changes needed to use it.
--color -f TmuxNotifier
@thedelchop
thedelchop / polite_remittance_slip.rb
Created September 28, 2012 15:49
Old code that was hard to read and NOT polite
module DEFT
class RemittanceSlip
def initialize(*credits)
@credits = credits
end
def print
output = print_header_record