Skip to content

Instantly share code, notes, and snippets.

View Insayt's full-sized avatar
🏠
Working from home

Alex Insayt Insayt

🏠
Working from home
  • Rostov-on-Don
View GitHub Profile
@Insayt
Insayt / Artisan.php
Created May 7, 2018 23:51
Laravel Cheat Sheet
php artisan --help OR -h
php artisan --quiet OR -q
php artisan --version OR -V
php artisan --no-interaction OR -n
php artisan --ansi
php artisan --no-ansi
php artisan --env
// -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
php artisan --verbose
.directive('embedVideoSrc', ['$compile','VideoService', function ($compile, VideoService) {
return {
link: function(scope, element, attrs) {
scope.srcVideo = attrs.embedVideoSrc;
var template = '';
var serviceVideo = VideoService.getVideoServiceByUrl(attrs.embedVideoSrc);
console.log(attrs);
attrs.embedVideoHeight = attrs.embedVideoHeight || 315;
'use strict';
angular.module('Yeopen')
.service('$videoApi', ['$modal', '$rootScope', '$state', 'AbstractService', 'Routes',
function ($modal, $rootScope, $state, AbstractService, Routes) {
var videoApi = new AbstractService(Routes.gallery);
angular.extend(videoApi, {
create: function(data) {
Execution of target "generate_doctrine_db_shem" failed for the following reason: /Users/insayt/Projects/yeopen-development/deploy/build.xml:52:26: Task exited with code 1
BUILD FAILED
/Users/insayt/Projects/yeopen-development/deploy/build.xml:52:26: Task exited with code 1
Total time: 29.8486 seconds
'use strict';
var _ = require('lodash'),
gulp = require('gulp'),
watch = require('gulp-watch'),
plumber = require('gulp-plumber'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
less = require('gulp-less'),
stripCssComments = require('gulp-strip-css-comments'),
@Insayt
Insayt / Counter
Created November 17, 2015 11:48
Derictive
app.directive('counter', function() {
var interval,
count = 0;
return {
link: function($scope, element, attrs, $rootScope) {
$scope.$on('counter:start', function() {
interval = setInterval(function() {
count += 1000;
@Insayt
Insayt / Service
Created November 17, 2015 11:45
Service
app.factory('$dataApi', function($http, $Api) {
return {
getCountries: function() {
return $http.get(appConfig.apiBase + 'country/index');
},
getStates: function(countryId) {
return $Api.get(appConfig.apiBase + 'state/index/?country=' + countryId);
},
getTimezones: function() {
return $http.get(appConfig.apiBase + 'timezone/index');
@Insayt
Insayt / Angular config
Last active November 17, 2015 11:42
Angular config
app.config(function($stateProvider,
$urlRouterProvider,
$locationProvider,
$translateProvider,
growlProvider,
$localStorageProvider) {
$locationProvider.html5Mode(true);
$translateProvider.useSanitizeValueStrategy('escape');
app.directive('select', function() {
return {
link: function($scope, element, attrs, $rootScope) {
setTimeout(function() {
$(element).on( 'change.fs', function(e) {
$(element).val(e.target.value).trigger('input');
$scope.$emit('filter:change');
} ).fancySelect();
}, 0);
}
var x = 1;
try {
x.noExistsMethod();
} catch (e) {
alert(e.toString().split('.')[0].split(':')[1].trim());
}
// x