Skip to content

Instantly share code, notes, and snippets.

View lee-dohm's full-sized avatar
😴
Taking some well-deserved naps

Lee Dohm lee-dohm

😴
Taking some well-deserved naps
View GitHub Profile
@lee-dohm
lee-dohm / blast-templates
Created April 2, 2018 20:17
Sample script to copy templates from a given location into a repo
#!/usr/bin/env ruby
require 'fileutils'
# Use: atom-templates [repo_name]
#
# 1. Clone the repository if it doesn't already exist; fetch `master` if it does
# 2. Clean up old `template-update` branch if it exists
# 3. Check out new branch `template-update` based on `origin/master`
# 4. Copy template files over
@lee-dohm
lee-dohm / terms-for-haunted-houses.md
Created October 27, 2017 16:44
Terms for entering a haunted house

My terms for entering a haunted house:

  1. I will not enter a room first
  2. I will not exit a room last
  3. I will not go to investigate any suspicious noises nor go searching for a fuse box
  4. Under no circumstances will I be left alone without a weapon of some sort

-- http://www.imdb.com/title/tt0890819/quotes/qt0431710

@lee-dohm
lee-dohm / test.js
Created February 2, 2017 17:11
Copy paste test
import '../support'
import CharacteristicsBlock from '../../src/hero/characteristics-block'
import HeroEnvironment from '../../src/renderer/hero-environment'
describe('CharacteristicsBlock', function () {
let block, heroEnv
beforeEach(function () {
heroEnv = new HeroEnvironment()
@lee-dohm
lee-dohm / sliding_session_timeout.ex
Created June 4, 2017 23:01 — forked from qertoip/sliding_session_timeout.ex
Elixir / Phoenix Sliding Session Timeout Plug
# How to use it:
#
# Plug it at the end of your :browser pipeline in your Phoenix app router.ex
# Make sure it is plugged before your session-based authentication and authorization Plugs.
#
# pipeline :browser do
# plug :accepts, ["html"]
# plug :fetch_session
# plug :fetch_flash
# plug :put_secure_browser_headers
@lee-dohm
lee-dohm / README.md
Created April 21, 2017 20:37 — forked from raysegantii/README.md
Use bootstrap-sass npm package with Phoenix's brunch
  1. install npm packages
  2. update brunch-config.js
  3. rename web/static/css/app.css to web/static/css/app.scss
  4. update web/static/css/app.scss
@lee-dohm
lee-dohm / styles.less
Created January 7, 2017 03:14
Atom Style Tweak - Highlight trailing whitespace except on the cursor line
atom-text-editor::shadow {
div.line:not(.cursor-line) {
.trailing-whitespace {
background-color: @background-color-error;
color: contrast(@background-color-error);
}
}
}
@lee-dohm
lee-dohm / styles.less
Created January 7, 2017 03:13
Atom Style Tweak - Make cursor pulse instead of blink
atom-text-editor, atom-text-editor::shadow {
.cursor {
transition: opacity 0.5s;
}
}
@lee-dohm
lee-dohm / styles.less
Created January 7, 2017 03:11
Atom Style Tweak - Unitalicize comments
atom-text-editor, atom-text-editor::shadow {
.comment {
font-style: normal;
}
}
@lee-dohm
lee-dohm / styles.less
Created January 7, 2017 03:11
Atom Style Tweak - Highlight the cursor line
atom-text-editor::shadow {
.cursor-line {
background-color: @background-color-highlight;
}
}
@lee-dohm
lee-dohm / styles.less
Created January 7, 2017 03:09
Atom Style Tweak - Add background shading behind spelling errors
atom-text-editor::shadow .misspelling {
background-color: @background-color-error;
opacity: 0.4;
border-radius: 6px;
border: none;
}