Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
/* | |
Chai - Add CustomMatchers | |
usage: | |
var CustomMatchers = require('./support/friendly_news_path_matcher'); | |
chai.use(CustomMatchers); | |
expect('/materia/FooBar').to.be.a.friendlyNewsPath(); | |
*/ |
// Came from the comments here: https://gist.github.com/maruf-nc/5625869 | |
app.filter('titlecase', function() { | |
return function (input) { | |
var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i; | |
input = input.toLowerCase(); | |
return input.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(match, index, title) { | |
if (index > 0 && index + match.length !== title.length && | |
match.search(smallWords) > -1 && title.charAt(index - 2) !== ":" && | |
(title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && |
describe('controllerCtrl', function () { | |
var $controller, | |
$rootScope, | |
$scope; | |
beforeEach(module('controller')); | |
beforeEach(inject(function ($injector) { | |
$controller = $injector.get('$controller'); | |
$rootScope = $injector.get('$rootScope'); |
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
Lato | |
<link href='http://fonts.googleapis.com/css?family=Lato:400,300italic,300,100,100italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'> | |
font-family: 'Lato', sans-serif; | |
Open Sans | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300italic,300,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'> |
alias ng="npm list -g --depth=0 2>/dev/null" | |
alias nl="npm list --depth=0 2>/dev/null" |
{ | |
"files": | |
{ | |
"Dojo": "http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js", | |
"MooTools": "http://mootools.net/download/get/mootools-core-1.4.5-full-compat-yc.js", | |
"PrototypeJS": "https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js", | |
"jQuery": "http://code.jquery.com/jquery.min.js", | |
"jQueryUI": "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js", | |
"normalize.css": "https://github.com/necolas/normalize.css/raw/master/normalize.css", | |
"jquery": "http://code.jquery.com/jquery.min.js", |
alias composer='php composer.phar' | |
alias composerinit='curl -s http://getcomposer.org/installer | php; composer init; echo composer.phar >> .gitignore' | |
alias composerdump='composer dumpautoload --optimize' |