This file contains 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 | |
$snippetPath = $modx->getOption('core_path').'components/star_rating/'; | |
$modx->addPackage('star_rating',$snippetPath.'model/'); | |
$c = $modx->newQuery('starRating'); | |
$c->sortby('vote_total','DESC'); | |
$c->sortby('vote_count','DESC'); | |
$c->limit('100'); | |
$c->prepare(); | |
$c->stmt->execute(); | |
$res = $c->stmt->fetchAll(PDO::FETCH_ASSOC); |
This file contains 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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"draw_indent_guides": true, | |
"draw_white_space": "selection", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
".git", |
This file contains 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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-icon-button/paper-icon-button.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<polymer-element name="my-element"> | |
<template> |
This file contains 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
git clone git://github.com/creationix/nvm.git ~/.nvm | |
printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc | |
NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh |
This file contains 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 | |
//$input = '44.60855718,33.5143017'; | |
if (!($input)) $output = ''; | |
$someshit = explode(',', $input); | |
$someshit = array_reverse($someshit); | |
$mystring = implode('%2C', $someshit); | |
// echo $mystring; | |
$output = '<script src="http://panoramas.api-maps.yandex.ru/embed/1.x/?lang=ru_UA&l=stv&ll=' . $mystring .'&ost=dir%3A36.6150270900669%2C0~spn%3A89.99999987427145%2C39.71042873864211&size=450%2C400"></script>'; | |
return $output; |
This file contains 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
function remove(s){ | |
return (s.slice(-1) == '!') ? s.substring(0, s.length - 1) : s; | |
} |
This file contains 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
function remove(s){ | |
return s.replace(/!+([^!])/g, '$1') | |
} |
OlderNewer