- Install Geocoder Laravel: https://geocoder-php.org/docs/
- Publish config
php artisan vendor:publish
(Look for Geocoder) - Setup your Google Geocoding API-Key in
config/geocoder.php
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 | |
/** | |
* Classes source autoload | |
*/ | |
class Varien_Autoload | |
{ | |
/** @var \Composer\Autoload\ClassLoader */ | |
private static $autoloader; | |
/** @var self */ |
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 | |
namespace Auctane\Api\Controller\Auctane; | |
use Exception; | |
use Magento\Framework\App\CsrfAwareActionInterface; | |
use Magento\Framework\App\Request\InvalidRequestException; | |
use Magento\Framework\App\RequestInterface; | |
class Index extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface | |
{ |
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
window.findHighestZ = () => [...document.querySelectorAll('body *')] | |
.map(elt => parseFloat(getComputedStyle(elt).zIndex)) | |
.reduce((z, highest=Number.MIN_SAFE_INTEGER) => | |
isNaN(z) || z < highest ? (isNaN(highest) ? 1 : highest) : z | |
) | |
//vanilla | |
document.getElementById("foo").style.zIndex = window.findHighestZ() |
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
public function showToasters(){ | |
// default info toaster with timeout | |
$this->toaster('your message'); | |
// makes it persistent | |
$this->toaster('your message')->persistent(); | |
// warning toaster with timeout | |
$this->toaster('your message')->warning(); |
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 | |
/** | |
* Ranking Library | |
* contains alogrithms for story ranking | |
* Basically a PHP Implementation of reddits algorithms | |
* | |
* @author Lucas Nolte <lnolte@i.biz> | |
* @since 0.1 | |
* @package Polska Wiadomosc | |
* @subpackage Libraries |
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
// FROM: http://davidwalsh.name/track-errors-google-analytics | |
// Track basic JavaScript errors | |
window.addEventListener('error', function(e) { | |
_gaq.push([ | |
'_trackEvent', | |
'JavaScript Error', | |
e.message, | |
e.filename + ': ' + e.lineno, | |
true |
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 | |
Builder::macro('deferredPaginate', function ($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) { | |
$model = $this->newModelInstance(); | |
$key = $model->getKeyName(); | |
$table = $model->getTable(); | |
$paginator = $this->clone() | |
// We don't need them for this query, they'll remain | |
// on the query that actually gets the records. |
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 | |
namespace Jobs; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Redis\Database as Redis; | |
class Foo extends Job | |
{ | |
use InteractsWithQueue; |
OlderNewer