Skip to content

Instantly share code, notes, and snippets.

View maynagashev's full-sized avatar
👨‍💻
Go get it

Evgeniy Maynagashev maynagashev

👨‍💻
Go get it
View GitHub Profile
@maynagashev
maynagashev / .env
Last active January 7, 2021 08:37
Socialite providers .ENV boilerplate records forked from https://github.com/jeremykenedy/laravel-auth
# https://www.google.com/recaptcha/admin#list
RE_CAP_SITE=YOURGOOGLECAPTCHAsitekeyHERE
RE_CAP_SECRET=YOURGOOGLECAPTCHAsecretHERE
# https://vk.com/apps?act=manage
VKONTAKTE_KEY=your_vk_app_id
VKONTAKTE_SECRET=your_vk_app_secret
VKONTAKTE_REDIRECT_URI=http://yourwebsiteURLhere.com/social/handle/vkontakte
# https://developers.facebook.com/
@maynagashev
maynagashev / spacing-.css
Last active February 7, 2018 16:43
Bootstrap 4 spacing
/* top */
.p-t-0 { padding-top: 0px; }
.p-t-1 { padding-top: 10px; }
.p-t-2 { padding-top: 15px; }
.p-t-3 { padding-top: 30px; }
/* bottom */
.p-b-0 { padding-bottom: 0px; }
.p-b-1 { padding-bottom: 10px; }
.p-b-2 { padding-bottom: 15px; }
@maynagashev
maynagashev / angular_pagination.js
Created November 15, 2016 13:06
Angular Simplest Pagination
var perPage = 10;
var items = [];
// init call
$scope.pagination = pagination(items, perPage, 1);
// subsequent calls (usually a method inside controller for ng-click)
this.showPage = function (page) {
$scope.pagination = pagination($scope.pagination.items, perPage, page);
};
@maynagashev
maynagashev / log.js
Last active November 12, 2016 13:40
Console.log redefine
window.log = function() {
try {
return console.log.apply(console, arguments);
} catch (_error) {}
};
// OR
window.log = function() { return console.log.apply(console, arguments); };
@maynagashev
maynagashev / parse-stock-keys-from-desc.php
Last active October 31, 2016 08:51
Prepares keywords for photo stock web sites: Shutterstock.com, iStockPhoto.com, Fotolia.com etc. Simple PHP parser script.
<?php
/*
From a plain text/description of photo, makes list of keywords, separated with comma, filtering articles and prepositions.
Example:
INPUT: Portrait of a happy bald man photographer with professional digital camera on his neck, he throws tons
of leaves falling in the air in autumn park, enjoying the sunshine weather, glad and satisfied.
OUTPUT: portrait, happy, bald, man, photographer, professional, digital, camera, neck, throws, tons, leaves, falling, air, autumn, park, enjoying, sunshine, weather, glad, satisfied
*/
$exclude = array(
'in', 'a', 'or', 'the', 'in', 'with', 'an', 'at', 'on', 'from', 'and', 'to', 'of', 'is', 'her', 'his', 'he', 'she', 'it'