Skip to content

Instantly share code, notes, and snippets.

@taly2808
taly2808 / excerpt.js
Last active August 29, 2015 14:21 — forked from mrmwiebe/excerpt.js
// # Excerpt Helper
// Usage: `{{excerpt}}`, `{{excerpt words="50"}}`, `{{excerpt characters="256"}}`
//
// Attempts to remove all HTML from the string, and then shortens the result according to the provided option.
//
// Defaults to words="50"
/*
Added optional ability to use 2 <!--excerpt--> tags in your posts to specify exactly what will be
@taly2808
taly2808 / page.hbs
Last active August 29, 2015 14:21 — forked from geekhunger/page.hbs
...
{{> posts_list}}
...
@taly2808
taly2808 / app.scss
Last active August 29, 2015 14:17 — forked from malixsys/app.scss
form i.icon.error {
color: $assertive;
}
form input + i.icon.error {
display: none;
margin-left: 8px;
}
form.ng-submitted input.ng-invalid + i.icon.error {
// Requires the Toast plugin: https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin
// And Ionic Framework: http://ionicframework.com
// ngCordova is used here, but easily removed: http://ngcordova.com/
// When running in Cordova, show the native toast. Outside of Cordova, show an Ionic Popup for the same period of time.
// Uses the API for the Toast plugin - message, duration, position.
// Differences are that: Ionic Popup ignores position, and doesn't allow doing anything while it shows.
.factory('Toast', function($rootScope, $timeout, $ionicPopup, $cordovaToast) {
return {
show: function (message, duration, position) {
// Intercepting HTTP calls with AngularJS.
angular.module('MyApp', [])
.config(function ($provide, $httpProvider) {
// Intercept http calls.
$provide.factory('MyHttpInterceptor', function ($q) {
return {
// On request success
request: function (config) {
// console.log(config); // Contains the data about the request before it is sent.
<?php
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class ViewsCommand extends Command {
/**
* The console command name.
*
* @var string