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
<?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' |
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
window.log = function() { | |
try { | |
return console.log.apply(console, arguments); | |
} catch (_error) {} | |
}; | |
// OR | |
window.log = function() { return console.log.apply(console, arguments); }; |
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 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); | |
}; |
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
/* 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; } |
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
# 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/ |
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
// Other versions | |
/** | |
* Smooth by Moving Average algorithm with prevData measurements data (optional) | |
* ---------------------------- | |
* USING COLLECTIONS VERY SLOW! | |
* ---------------------------- | |
* @param $data | |
* @param $len |
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
<div class="wrapper tiles"> | |
@foreach($articles as $d) | |
{{$d->title}} | |
<input type="hidden" class="article-id" name="article-id" value="{{$d->id}"> | |
@endforeach | |
</div> |
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
class pinbaWrapper { | |
private $pinbaEnabled; | |
public function __construct() { | |
$this->pinbaEnabled = extension_loaded('pinba'); | |
} | |
public function __call($name, $arguments) { | |
if (!$this->pinbaEnabled) return false; |
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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); |
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
/** | |
* Created by maynagashev on 21.04.17. | |
*/ | |
/** | |
* Shared Object for storing current Active Filter settings, used in: | |
* @components: moments-list, filter-bar, load-more | |
* | |
* + historyAPI (write and read new status) | |
* |
OlderNewer