Skip to content

Instantly share code, notes, and snippets.

@thenickcox
thenickcox / nc-css-style-guide.md
Last active December 20, 2015 12:48
Navigating Cancer CSS (Sass) style guide

File Structure

For starters, we're going to want to apply the boy scout rule to our CSS. A lot of our legacy code contains inline CSS and JavaScript directives like so:

-# bad
-# somefile.html.haml
- content_for :document_ready do
  $('.button').click(function(){
 alert('You clicked a button!'); 
@thenickcox
thenickcox / bob.rb
Created August 12, 2013 16:57
exercism.io solution to first problem
class Bob
def hey(str)
@string = StringInterpreter.new(str)
handle_responses
end
private
def handle_responses
@thenickcox
thenickcox / bob.rb
Created August 12, 2013 17:19
First attempt at exercism.io
class Bob
def hey(str)
string = StringInterpreter.new(str)
# yes, obviously this sucks. help?
if string.is_empty_or_nil?
TeenageResponder.fine
elsif string.is_upcased?
TeenageResponder.chill_out
" Vim color file - SolarizedDark_modified
" Generated by http://bytefluent.com/vivify 2013-06-20
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
<body class="app">
<div class="stripeInitialSpinner" id="stripeSpinner"></div>
<div class="stripeErrorMessage" id="stripeLoadError">
<p>Sorry, there was a problem loading Checkout. If this persists, please <a href="/mailto:[email protected]/">email [email protected]</a>
</p>
</div>
<script type="text/javascript">
(function () {
var hideSpinner = function () {
@thenickcox
thenickcox / karma.conf.js
Created April 2, 2014 06:02
karma.conf.js
// Karma configuration
// Generated on Tue Apr 01 2014 08:28:36 GMT-0700 (PDT)
module.exports = function(config) {
config.set({
basePath: 'javascripts',
// frameworks to use
@thenickcox
thenickcox / .tmux.conf
Created June 10, 2014 17:05
.tmux.conf
# Hide status bar
set -g status off
# Turn off automatic window renaming
set-window-option -g automatic-rename off
# Set colors
set -g default-terminal "screen-256color"
# Copy/paste support workaround
./app/views/layouts/application.html.haml:37:in `_app_views_layouts_application_html_haml___3695870026403153749_70354936293200'
./vendor/bundle/gems/actionpack-3.2.13/lib/action_view/template.rb:145:in `block in render'
./vendor/bundle/gems/skylight-0.3.12/lib/skylight/vendor/active_support/notifications.rb:161:in `instrument'
./vendor/bundle/gems/actionpack-3.2.13/lib/action_view/template.rb:143:in `render'
./vendor/bundle/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
./vendor/bundle/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
./vendor/bundle/gems/skylight-0.3.12/lib/skylight/vendor/active_support/notifications.rb:159:in `block in instrument'
./vendor/bundle/gems/skylight-0.3.12/lib/skylight/vendor/active_support/notifications/instrumenter.rb:20:in `instrument'
./vendor/bundle/gems/skylight-0.3.12/lib/skylight/vendor/active_support/notificatio
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>
@thenickcox
thenickcox / Gemfile
Created December 21, 2014 02:37
Gemfile
gem 'backbone-on-rails'
gem 'ruby-haml-js'