- Two modes, insert and command
- Basic movement: h, j, k, and l
- Word movement: w, e, b
- Number powered movement, e.g. 5w
- Insert text repeatedly, e.g. 3iYes
- Find a character, f and F
- Go to matching parentheses, %
- Go to start/end of line, 0 and $
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[placeholder]:focus::-webkit-input-placeholder { | |
transition: opacity 0.5s 0.5s ease; | |
opacity: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference jQuery | |
$ = jQuery | |
# Adds plugin object to jQuery | |
$.fn.extend | |
# Change pluginName to your plugin's name. | |
pluginName: (options) -> | |
# Default settings | |
settings = | |
option1: true |
Below is an excerpt from http://nicolasgallagher.com/about-html-semantics-front-end-architecture/ explaining why you would want to use multiple related classes on an element vs. one class that gets extended in the CSS.
Components often have variants with slightly different presentations from the base component, e.g., a different coloured background or border. There are two mains patterns used to create these component variants. I’m going to call them the “single-class” and “multi-class” patterns.
.btn, .btn-primary { /* button template styles */ }
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replaces all of Vote.users array | |
Votes.update( | |
{_id: '32dc6fa5-052e-4e2c-8a90-4bd235bf3b0d'}, | |
{ | |
$set: { | |
'users': [ | |
{ | |
id: '2f537a74-3ce0-47b3-80fc-97a4189b2c15', | |
vote: 0 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Meteor working with accounts | |
# Getting the current user id | |
user = Meteor.userId() | |
# Run some stuff whenever a cursor or session changes | |
Meteor.startup -> | |
Meteor.autorun -> | |
if not Session.get('selected') | |
party = Parties.findOne() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MyObject(options) { | |
/***************************************** | |
/* PRIVATE VARS | |
/****************************************/ | |
var self = { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": "root-project-folder", | |
"folder_exclude_patterns": ["css", ".sass-cache"] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=320"> | |
<meta name="viewport" content="width=device-width"> | |
<meta name="viewport" content="initial-scale=1"> | |
<meta name="viewport" content="maximum-scale=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |