Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
toddmotto / *.md
Last active May 24, 2021
Component versus Directive in AngularJS
View *.md

Component versus Directive in AngularJS


Components are not "helper" methods, they are the best change in Angular 1.x since I've been using it.

What is the role of .component()?

  • Declares new HTML via a template or templateUrl
  • Should be used to create Components as part of a Component architecture
View datetimepickerDirective.js
(function () {
var dateTimeController = function ($scope, $rootScope) {
$scope.vm = {
message: "Bootstrap DateTimePicker Directive",
dateTime: {}
$scope.$watch('change', function(){
rxaviers / gist:7360908
Last active Jan 24, 2022
Complete list of github markdown emoji markup
View gist:7360908


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
bennadel / lazy-loading-images.htm
Created Jul 23, 2013
Lazy Loading Image With AngularJS
View lazy-loading-images.htm
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<meta charset="utf-8" />
Lazy Loading Images With AngularJS
<style type="text/css">
christopherscott / ExcelToJsDate.js
Created May 24, 2012
Convert Excel date values to JavaScript date objects
View ExcelToJsDate.js
// Convert Excel dates into JS date objects
// @param excelDate {Number}
// @return {Date}
function getJsDateFromExcel(excelDate) {
// JavaScript dates can be constructed by passing milliseconds
// since the Unix epoch (January 1, 1970) example: new Date(12312512312);
kmansoft /
Created May 22, 2012
A simple script to create lower-resolution Android drawables from higher-resolution ones.
import sys
import argparse
import os
import re
A simple script to create lower-resolution Android drawables from higher-resolution ones.
View sass_and_less_compared.markdown

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.