Skip to content

Instantly share code, notes, and snippets.

@aeberlin
aeberlin / init.coffee
Created November 24, 2015 15:12
Atom Path Initialization
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@aeberlin
aeberlin / .rubocop.yml
Last active October 12, 2018 14:35
Sane RuboCop Configuration
AllCops:
RunRailsCops: true
DisplayCopNames: true
DisplayStyleGuide: false
ExtraDetails: false
UseCache: false
Exclude:
- bin/**/*
- db/schema.rb
- db/seeds.rb
@aeberlin
aeberlin / init.coffee
Created December 2, 2015 15:09
Atom Snippets
childProcess = require('child_process')
fs = require('fs')
path = require('path')
spawn = require('child_process').spawn
spawnPath = atom.project.getPaths()[0]
if not fs.statSync(spawnPath).isDirectory()
spawnPath = path.dirname(dir)
parseCharArray = (array) ->
# app/models/concerns/multiparameter_attribute_assignment.rb
module MultiparameterAttributeAssignment
include ActiveModel::ForbiddenAttributesProtection
def initialize(params = {})
assign_attributes(params)
end
def assign_attributes(new_attributes)