This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Truncate Html string without stripping tags | |
register in Resources/config/services.yml with: | |
services: | |
truncatehtml.twig.extension: | |
class: Radley\TwigExtensionBundle\Extension\TruncateHtmlExtension | |
tags: | |
- { name: twig.extension } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test develop and feature branches | |
on: | |
push: | |
branches: | |
- develop | |
- "feature/*" | |
jobs: | |
test: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Router } from '@angular/router'; | |
import { Action, Selector, State, StateContext, Store } from '@ngxs/store'; | |
import { AngularFireAuth } from 'angularfire2/auth'; | |
import * as firebase from 'firebase'; | |
import { take, tap } from 'rxjs/operators'; | |
import { | |
CheckSession, | |
LoginWithFacebook, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global AFRAME THREE */ | |
if (typeof AFRAME === 'undefined') { | |
throw new Error('Component attempted to register before AFRAME was available.'); | |
} | |
var radToDeg = THREE.Math.radToDeg; | |
/** | |
* Example component for A-Frame. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<svg width="960" height="500"></svg> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script> | |
var svg = d3.select("svg"), | |
width = +svg.attr("width"), | |
height = +svg.attr("height"), | |
transform = d3.zoomIdentity;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
@Injectable() | |
export class LocalStorageService { | |
public localStorage: any; | |
constructor() { | |
if (!localStorage) { | |
throw new Error('Current browser does not support Local Storage'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Http, | |
ConnectionBackend, | |
Headers, | |
Request, | |
RequestOptions, | |
RequestOptionsArgs, | |
Response, | |
RequestMethod, | |
} from '@angular/http'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { isString } from 'lodash'; | |
import { | |
Http, | |
ConnectionBackend, | |
Headers, | |
Request, | |
RequestOptions, | |
RequestOptionsArgs, | |
Response, | |
RequestMethod, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import java.net._ | |
import java.io.File | |
import play.PlayRunHook | |
/* | |
Grunt runner should be in project directory to be picked up by sbt | |
*/ | |
object Grunt { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Install Both Library and TypeScript defintion files in one go | |
# | |
npmd() { | |
#do things with parameters like $1 such as | |
npm install --save $1 | |
npm install --save-dev @types/$1 | |
} | |
alias npmd=npmd |