/*
Nope! The baseline of our text will be on top of the bottom border.
The 40px line height will extend above the top border causing the text
to be slightly towards to top of the "content" area.
*/
.vcenter-text-inline{
box-sizing: border-box;
height: 40px;
border: 2px solid black;
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
/* | |
automatically sync files from the deploy directory back to the source directory | |
*/ | |
module.exports = function( grunt ){ | |
grunt.initConfig( { | |
copy : { | |
main: { | |
files : [ | |
] |
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
module.exports = function( grunt ){ | |
var sourceFiles = [ 's-code.js', 's-code-page.js']; | |
grunt.initConfig({ | |
pkg : grunt.file.readJSON( 'package.json' ), | |
uglify : { | |
all : { | |
files : { |
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
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
#JavaScript Unit Testing Tips and Tricks#
###Please add your your tips and tricks for unit testing JavaScript as comments to this gist. I'll pull them into the main text and credit your contribution.###
- Create/use snippits to scaffold testing methods ( i.e. if you are using BDD scaffold
describe
andit
methods) - Write tests with the same care as production code
- DRY. Factor out repeated code into methods
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
/* | |
first install matchdep via NPM: npm-install matchdep --save-dev | |
then replace all of your grunt.loadNpmTasks( 'taskname' ) code with the following line: | |
*/ | |
//dynamically load tasks | |
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks ); |
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 ($, _, Backbone, nmConnect) { | |
var createReportView = Backbone.View.extend({ | |
el: '#CreateReportSection', | |
initialize: function() { | |
var selectPagesContainer = $('#SelectPagesContainer'); | |
var invstCheckbox = selectPagesContainer.find('[id$=InvstCheckbox]'); | |
var insuranceCheckbox = selectPagesContainer.find('[id$=InsuranceCheckbox]'); |
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
<?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>author</key> | |
<string>Jacob Rus</string> | |
<key>comment</key> | |
<string>Created by Jacob Rus. Based on ‘Slate’ by Wilson Miner</string> | |
<key>name</key> | |
<string>Cowboy - Presentation</string> |
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
var server = sinon.fakeServer.create(); | |
server.respondWith( | |
'PUT', | |
'http://localhost/JavaScriptLogging.ashx.+', | |
[ | |
200, | |
{ "Content-Type": "application/json" }, |
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
$( '#selector') | |
.on('click', function(){ | |
... | |
}) | |
.on('mouseenter', function(){ | |
... | |
}); |
NewerOlder