Skip to content

Instantly share code, notes, and snippets.

View djfrsn's full-sized avatar
🎯
Focusing

Dennis Jefferson djfrsn

🎯
Focusing
View GitHub Profile
Names/Shortcuts listed for VS Code but applicable to any editor
#### Go To Symbol
Cmd+R
#### Go To Symbol In File
Cmd+Shift+R
JS DOM BB SSR
http://www.changer.nl/devlog/2013/07/10/SSR-For-Backbone/
// grab html, test which is faster
jsdom.serializeDocument(window.document)
window.document.documentElement.innerHTML
// send to server
var inViewTool = function () {
var inViewToolName, names;
return {
setName: function ( s ) { return inViewToolName = s; },
name: function ( ) { return inViewToolName; },
setNames: function ( a ) { return names = a; },
names: function ( ) { return names; },
concatName: function ( n, m ) { return names[n] + ' ' + names[m]; }
};
}();
@djfrsn
djfrsn / loginPage.html
Created August 5, 2015 02:14
Meteor User Registration accounts-password
<template name="loginPage">
<div class="loginPage">
<h1 class=" l-brand">~:/lib</h1>
<div class="l-signup row">
<form class="col s12">
<div class="row">
<div class="input-field col s6">
<input id="userName" type="text" class="validate">
@djfrsn
djfrsn / meteorTemplateLevelSubscriptions.html
Last active August 29, 2015 14:26
Meteor Template Level Subscriptions
<template name="dashboardSlideOut">
{{> accountsBreadcrumb}}
{{#if Template.subscriptionsReady}}
<ul class="collection">
{{#each libSections}}
<li class="collection-item">{{ libSection }}
<i class="material-icons">heart</i>
</li>
{{/each}}
</ul>
Router.configure({
layoutTemplate: 'Main',
loadingTemplate: 'Loading',
notFoundTemplate: 'NotFound',
load: function() {
$('html, body').animate({
scrollTop: 0
}, 400);
return $('.content').hide().fadeIn(1000);
@djfrsn
djfrsn / responsivemarkers
Created February 22, 2015 08:09
Responsive Markers
/* ADD-ON
-------------------------------------------------- */
body:after{content:"less than 320px";font-size:1rem;font-weight:bold;position:fixed;bottom:0;width:100%;text-align:center;background-color:hsla(1,60%,40%,0.7);color:#fff;height:20px;padding-top:0;margin-left:0;left:0}@media only screen and (min-width:320px){body:after{content:"320 to 480px";background-color:hsla(90,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:480px){body:after{content:"480 to 768px";background-color:hsla(180,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:768px){body:after{content:"768 to 980px";background-color:hsla(270,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:980px){body:after{content:"980 to 1024px";background-color:hsla(300,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}@media only screen and (min-width:1024px){body:after{content:"1024 and up";background-color:hsla(360,60%,40%,0.7);height:20
@djfrsn
djfrsn / .bash_profile
Last active October 15, 2015 16:37
bash profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@djfrsn
djfrsn / vertical-align
Last active August 29, 2015 14:04
Centering
// Horizontal
---Images
.winedetails_label img
{
display: block;
margin-left:auto;
margin-right:auto;
}