Skip to content

Instantly share code, notes, and snippets.

View leemason's full-sized avatar
🎯
Focusing

Lee Mason leemason

🎯
Focusing
View GitHub Profile
<?php
public function options() {
return array(
'id'=>array('type' => 'boolean', 'required' => true),
'type'=>'button_set',
'title'=>array('type' => 'string', 'required' => true),
'subtitle'=>array('type' => 'string', 'required' => true),
'desc'=> array('type' => 'string', 'required' => true),
'required' => true,
'customizer' => true,
<?php
//current way
$options = array(
'key1' => 'value',
'key2' => array(
'key3' => ''
)
);
{
"my json question?" : "my json answer",
"my json question2?" : "my json answer2",
"my json question3?" : "my json answer 3"
}
<?php
### --- Snip --- ###
App::after(function($request, $response)
{
// HTML Minification
if(App::Environment() != 'local')
{
if($response instanceof Illuminate\Http\Response)
@leemason
leemason / fluent-demo-force-direct.php
Created August 22, 2014 19:13
"fake" fileysstem direct mode.
<?php
/*
Plugin Name: Fluent Demo - force direct
Plugin URI: #
Description: Forces wp to think it has direct filesystem access during ajax and admin requests.
Author: No Half Pixels Ltd
Version: 1.0.0
Author URI: http://nohalfpixels.com
*/
add_filter( 'filesystem_method', function($method){
@leemason
leemason / autoload.php
Created November 6, 2015 14:43
simple fix to prevent composer update / clear-compiled errors
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
<?php
//Welcome to the new blog ;-)
echo 'Hello World';
30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log
35 2 * * 1 /etc/init.d/nginx reload
cd /opt/letsencrypt
./letsencrypt-auto certonly -a webroot --webroot-path=/path/to/site -d example.com -d www.example.com