Skip to content

Instantly share code, notes, and snippets.

View dgtlmonk's full-sized avatar
💭
We first make our habits, and then our habits make us.

dgtlmonk dgtlmonk

💭
We first make our habits, and then our habits make us.
View GitHub Profile
// package.json
{
"name": "application",
"version": "0.0.1",
"private": true,
"dependencies": {},
"devDependencies": {
"matchdep": "^0.3.0",
"grunt": "^0.4.4",
"grunt-contrib-watch": "^0.6.1",
https://www.muscleandstrength.com/tools/bmr-and-daily-calorie-calculator.html
= Your Daily Calorie Requirements Are: 2489 Calories Per Day
@ 155lb body mass
1. Set protein intake at 1g/lb of lean body mass = 155g (21 g per 100g chicken breast / 1 large Egg = 3.6g)
2. This individual is moderately insulin sensitive so
we’ll set his carbohydrate intake at
1.5g/lb of lean body mass: = 232.5g (approx 6-7 cups rice)
3. Since carbohydrates and proteins contain 4 calories per gram,
<script type="text/javascript" charset="utf-8">
"use strict";
var ua = navigator.userAgent;
var checker = {
iphone: ua.match(/(iPhone|iPod|iPad)/),
blackberry: ua.match(/BlackBerry/),
android: ua.match(/Android/)
};
if (checker.iphone) setStatus('iOS');
http://www.sitepoint.com/css-techniques-for-retina-displays/
// via JS
$(document).ready(function(){
if (window.devicePixelRatio > 1) {
var lowresImages = $('img');
images.each(function(i) {
var lowres = $(this).attr('src');
https://github.com/polarmobile/coffeescript-style-guide
http://stackoverflow.com/questions/12630204/angularjs-inject-provider-into-module-factory-function-by-string-name-for-minifi/24663463#24663463
" vim-airline
nmap <S-Tab> :tabnext <CR>
nmap <S-q> :tabclose <CR>
nmap <S-T> :tabnew <CR>
map <S-w> :NERDTreeToggle <CR>
" font Andale Mono; horiz 4 lines; vert 1.0;
IIFE = http://toddmotto.com/minimal-angular-module-syntax-approach-using-an-iife/
Controller as = http://toddmotto.com/digging-into-angulars-controller-as-syntax/
Rethinking controller = http://toddmotto.com/rethinking-angular-js-controllers/
Opinionated Style Guide - http://toddmotto.com/opinionated-angular-js-styleguide-for-teams/
https://medium.com/@dickeyxxx/best-practices-for-building-angular-js-apps-266c1a4a6917
Gulp
window.addEventListener('scroll', function(){
if (vOverlay) {
vOverlay.style.top = window.pageYOffset + "px";
vOverlay.style.left = window.pageXOffset + "px";
}
}, false);
window.addEventListener('resize', function(){
if (vOverlay) {
function getDrink (type) {
var drinks = {
'coke': function () {
return 'Coke';
},
'pepsi': function () {
return 'Pepsi';
},
'lemonade': function () {
return 'Lemonade';