This file contains hidden or 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
// fetch ace's language tools module: | |
var langTools = ace.require('ace/ext/language_tools'); | |
// data stub: | |
var sqlTables = [ | |
{ name: 'users', description: 'Users in the system' }, | |
{ name: 'userGroups', description: 'User groups to which users belong' }, | |
{ name: 'customers', description: 'Customer entries' }, | |
{ name: 'companies', description: 'Legal entities of customers' }, | |
{ name: 'loginLog', description: 'Log entries for user log-ins' }, |
This file contains hidden or 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 { Component } from '@angular/core'; | |
import { AngularFire, FirebaseObjectObservable } from 'angularfire2'; | |
import {ActivatedRoute, Params} from "@angular/router"; | |
import {Observer} from "rxjs"; | |
@Component({ | |
selector: 'app-detail', | |
template: ` | |
<h2>{{book.title}}</h2> | |
<p>{{book.author}}</p> |
This file contains hidden or 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
var gulp = require("gulp"); | |
var browserify = require("browserify"); | |
var babelify = require("babelify"); | |
var source = require("vinyl-source-stream"); | |
var config = { | |
src: "index.js", | |
filename: "bundle.js", | |
dest: "./" | |
}; | |
var extensions = ['.js', '.ts', '.json']; |
This file contains hidden or 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
angular.module('utilsModule').filter("megaNumber", () => { | |
return (number, fractionSize) => { | |
if(number === null) return null; | |
if(number === 0) return "0"; | |
if(!fractionSize || fractionSize < 0) | |
fractionSize = 1; | |
var abs = Math.abs(number); |
This file contains hidden or 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
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
In order for Livereload to work, you need a Firefox or Chrome extension as Gulp doesn't inset it automatically. Alternatively, you can also manually put the livereload script in footer.php
, just make sure to insert it only on development environment:
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
This file contains hidden or 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
/** | |
* the HTML5 autofocus property can be finicky when it comes to dynamically loaded | |
* templates and such with AngularJS. Use this simple directive to | |
* tame this beast once and for all. | |
* | |
* Usage: | |
* <input type="text" autofocus> | |
* | |
* License: MIT | |
*/ |
This file contains hidden or 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
// set the default amount of items being displayed | |
$scope.limit= 5; | |
// loadMore function | |
$scope.loadMore = function() { | |
$scope.limit = $scope.items.length | |
} |
NewerOlder