Skip to content

Instantly share code, notes, and snippets.

<?php
$limit = 4;
$order = "DESC";
if(array_key_exists('limit',$_GET)) {
$limit = $_GET['limit'];
}
if(array_key_exists('order',$_GET)) {
try {
data = JSON.parse(data);
if (data.length > 0) {
if (data[0].timestamp === _this.lastTimestamp) {
_this.itemIndex = 0;
_this.lastTimestamp = null;
_this.isPolling = false;
_this.startPoll();
} else {
/* Variable storing three variations */
$brand-primary: (1: cornflowerblue, 2: tomato, 3: lightcoral);
/* Set the body background to tomato */
body {
background-color: map-get($brand-primary, "2");
}
.pipe(gulpStylelint({ failAfterError: false, reporters: [ { formatter: 'string', console: true } ] }))
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 2,
"max-empty-lines": 2,
"font-family-name-quotes": "always-unless-keyword",
"function-url-quotes": "never",
"selector-attribute-quotes": "always",
"string-quotes": "double",
@8lane
8lane / gist:9e8fb1971270498a073b22c4b48be1ee
Last active September 13, 2016 14:29
ANW Scaffolding with legacy spacing classes support
/* Scaffolding
/*--------------------------------------------------------------*/
/* Legacy spacing from website (e.g. row--vertical-spacing-top-2) used heavily
throughout app should be deprecated and Bootstrap 4 spacing used instead */
@for $i from 0 to 6 {
.row--vertical-spacing-#{$i} { margin-top: $grid-gutter-width * $i; margin-bottom: $grid-gutter-width * $i; }
.row--vertical-spacing-top-#{$i} { margin-top: $grid-gutter-width * $i; }
.row--vertical-spacing-bottom-#{$i} { margin-bottom: $grid-gutter-width * $i; }
.anw-register input[id="NotARealPerson"] {
display: none;
}
import {join} from 'path';
import {APP_SRC} from '../config';
export = function buildSassDev(gulp, plugins, option) {
return function() {
return gulp.src(join(APP_SRC, '**', '*.scss'))
.pipe(plugins.sass().on('error', plugins.sass.logError))
.pipe(plugins.sourcemaps.init())
.pipe(plugins.autoprefixer({ browsers: ['last 2 versions'], cascade: false }))
.pipe(plugins.sourcemaps.write('.'))
// Demo Tracks Account
// --------------------------------------------------
$tracks-total: 10;
%tracks-used {
font-family: FontAwesome;
content: "\f058";
font-size: 23px;
@8lane
8lane / colors.scss
Last active February 22, 2016 16:56
$brand-primary: cornflowerblue;
$brand-primary-alt: darken($brand-primary, 10%);
$brand-secondary: adjust-color(tomato, hue: -10%, saturation: -10%);
$brand-secondary-alt: lighten($brand-secondary, 30%);