Skip to content

Instantly share code, notes, and snippets.

View kenseals's full-sized avatar
✍️
Designing

Ken Seals kenseals

✍️
Designing
View GitHub Profile
@kenseals
kenseals / git-commands.md
Last active February 22, 2016 20:00
Common git commands

git commit --amend --no-edit

--amend is useful for adding additional changes to the last commit. For example, say you commited some changes then made an additional update, like removed console logs. --no-edit uses the previous commit message.

@kenseals
kenseals / npm-commands.md
Last active February 11, 2016 20:46
Common npm commands

List all globally installed modules:
sudo npm list -g --depth=0

Show all outdated globally install modules:
sudo npm outdated -g --depth=0

Update all globally installed modules:
sudo npm update -g

To upgrade npm to latest:

@kenseals
kenseals / undorederd-ordered-list
Created May 10, 2015 16:09
Ordered list using ul (easier to style numbers)
.ordered-list {
display: block;
margin-left: 0;
list-style: none;
li {
display: block;
margin-left: 0;
padding-left: 0;
counter-increment: table-ol;
&:before {
@kenseals
kenseals / Fancy-Text-Inputs.markdown
Created June 16, 2014 18:00
A Pen by Alex Bergin.
@kenseals
kenseals / toggle_state.js.coffee
Created March 10, 2014 20:25
Toggle the state of a UI component. Intended for use with mechanisms like a dropdown list or navigation. For example, hide/show a menu by clicking a button. If the menu is open, hide it by clicking anywhere in the document.
$ ->
window.toggleState = (controller, target) ->
$controller = document.querySelector(controller)
$target = document.querySelector(target)
closeMenu = ->
$target.setAttribute('data-state', 'closed')
$controller.setAttribute('data-state', 'closed')
openMenu = ->
$target.setAttribute('data-state', 'open')
$controller.setAttribute('data-state', 'open')