Skip to content

Instantly share code, notes, and snippets.

View Splaktar's full-sized avatar

Michael Prentice Splaktar

View GitHub Profile
// import global themes
@import '~@angular/material/theming';
@import './ng-io-theme';
// import global variables
@import './constants';
// import global mixins
@import './mixins';
@import '~@angular/material/theming';
// Plus imports for other components in your app.
// Include the base styles for Angular Material core. We include this here so that you only
// have to load a single css file for Angular Material in your app.
@include mat-core();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue.
@Splaktar
Splaktar / styles.scss
Created October 4, 2017 20:47
Angular Material Theming Guide Example
@import '~@angular/material/theming';
// Plus imports for other components in your app.
// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat-core();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
@Splaktar
Splaktar / app.component.ts
Last active July 14, 2016 05:27 — forked from StephenFluin/app.component.ts
Angular 2 Analytics via Routing
//...
import {ROUTER_DIRECTIVES, Router, Event, NavigationEnd} from '@angular/router';
import {environment} from './environment';
//...
declare var ga : any;
//..
constructor(private router: Router ) {
@Splaktar
Splaktar / replicationController.json
Last active April 16, 2016 22:05
Replication Controller config spec for Kubernetes code lab
{
"apiVersion": "v1",
"kind": "ReplicationController",
"metadata": {
"name": "hello-node"
},
"spec": {
"replicas": 2,
"selector": {
"app":"hello-node"
@Splaktar
Splaktar / flexBox.md
Last active November 2, 2015 05:29 — forked from ThomasBurleson/flexBox.md
Angular Material - FlexBox styles for Layout features
[flex] { 
  box-sizing: border-box;
 }

[flex]           { flex: 1;         } // == { flex: 1 1 0%; }
[flex="grow"]    { flex: 1 1 100%;  }
[flex="initial"] { flex: 0 1 auto;  }
[flex="auto"]    { flex: 1 1 auto;  }
[flex="none"] { flex: 0 0 auto; }
@Splaktar
Splaktar / .gitignore_global
Last active October 5, 2015 03:37
Git Ignore Global
# https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
@Splaktar
Splaktar / gist:8c955d31bc5db42e64fe
Created February 13, 2015 22:42
Using the Google Fit API via Google Play Services on Android
package com.devintent.fitness.app;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.content.IntentSender;
@Splaktar
Splaktar / auto-fill-sync
Created October 23, 2014 18:43
Directive to fix input fields that need to support browser autofill such as username and password
/**
* @ngDoc directive
* @restrict A
* @description Add this attribute to input fields that need to support browser autofill such as username and password.
*/
main.directive('autoFillSync', function($timeout) {
return {
require: 'ngModel',
restrict: 'A',
link: function(scope, elem, attrs, model) {
@Splaktar
Splaktar / app.css
Created May 16, 2014 01:01
AngularJS Animations (ng-enter, ng-leave, fade, slide) in a ng-repeat div
.fade {
transition:0.5s linear all;
}
.fade.ng-enter-stagger,
.fade.ng-leave-stagger {
transiton-delay:0.1s;
transition-duration:0s;
}
.fade.ng-enter {
opacity:0;