Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/kml/2.2 http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd http://www.google.com/kml/ext/2.2 http://code.google.com/apis/kml/schema/kml22gx.xsd">
<Document id="WarwickshireRing_Simple">
<name>WarwickshireRing_Simple</name>
<Snippet></Snippet>
<Folder id="FeatureLayer0">
<name>WarwickshireRing_Simple</name>
<Snippet></Snippet>
<Placemark id="ID_00001">
@dannewns
dannewns / AuthController.php
Last active October 28, 2015 17:41 — forked from trovster/AuthController.php
Laravel 5.1 Auth functionality.
<?php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use Illuminate\Mail\Message;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\PasswordBroker;
use Illuminate\Support\Facades\Password;
use Illuminate\Foundation\Auth\ThrottlesLogins;
'meta_query' => array(
array(
'key' => 'product_current_stock',
'value' => "(SELECT wp_postmeta.meta_value as min_stock FROM wp_postmeta WHERE wp_postmeta.post_id = wp_posts.ID AND wp_postmeta.meta_key = 'product_minimum_stock')",
'compare' => '>='
)
),
#I currently have this method that returns a list of reads from a cube.
/**
* returns the current reads for the device id passed to it
* @param string $device_id the device uid to use
* @return array the device current reads from the API
*/
public function getDeviceCurrentReads($device_id = NULL)
{
if (is_null($device_id)) return NULL;
//Current
$devices = $cube->get('devices/');
//Just wondering if it might be worth having some common methods such as
$devices = $cube->devices();
$device = $cube->getDevice($deviceId);
$args = array('post_type' => 'review', 'post_status' => 'publish', 'orderby' => 'rand', 'per_page' => 1);
$review = new WP_Query();
$review = $review->query($args);
/**
* Mutators
*/
public function setEmailAttribute($value)
{
$value = \Import::splitMultipleFieldsData($value);
$this->setEmailAddressesAttribute($value);
}
@dannewns
dannewns / gist:a823b72a61f315710844
Created November 19, 2014 12:46
Repository Version
Route::get('{something}/csv', ['uses' => 'SomeController@getCSV', 'as' => 'csv.get']);
SomeController {
public function getCSV($something)
{
$csv = $this->csv_repository->find($something);
<?php namespace Patina\Extensions;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
class PatinaApiAuthenticationProvider extends \Dingo\Api\Auth\Provider {
/**
* Illuminate authentication manager.

Logo

Now Hiring: ParkatmyHouse.com

At ParkatmyHouse.com we are looking to expand our small team to include a number of new development positions ahead of a major project. Go ahead and take a look at the role descriptions. If the must haves don't quite fit, let us know anyway, you never know!


Front-end Developer

Must have