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
########## | |
# Win10 Initial Setup Script | |
# Author: Disassembler <[email protected]> | |
# Version: 1.7, 2016-08-15 | |
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ | |
# THIS IS A PERSONALIZED VERSION | |
# This script leaves more MS defaults on, including MS security features. | |
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1 |
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 | |
// @todo post editing | |
/** | |
* Gets the cmb instance | |
* | |
* @param string $metabox_id The id of the metabox as it is registered with `new_cmb2_box` e.g. `architect` | |
* @return CMB2 object | |
*/ |
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
var ES = ES||{}; | |
ES.conf = ES.conf||{}; | |
ES.conf.property = 'foo'; | |
ES.Views = { | |
render = function(template, data) { | |
} | |
}; |
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
{ | |
"require": { | |
"slim/slim": "2.*", | |
"illuminate/database": "*", | |
"dhorrigan/capsule": "*" | |
} | |
} |
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 | |
use lithium\core\ErrorHandler; | |
use lithium\action\Response; | |
use lithium\net\http\Media; | |
use lithium\analysis\Debugger; | |
use lithium\analysis\Logger; | |
use lithium\core\Environment; | |
/** |
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 | |
/** | |
* Do a raw sql query. | |
* | |
* @param $sql | |
* @return \lithium\data\source\database\adapter\Pdo\Result | |
*/ | |
public static function execute($sql) { | |
return static::connection()->invokeMethod('_execute', array($sql)); |
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 | |
/** | |
* Redirect to SSL if we are not in development mode. | |
* | |
* @param object $request | |
* @param array $params | |
* @param array $options | |
* | |
* @return object |
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
// Permanent redirect of old product URLs. | |
Router::connect('/productdetails/{:id}', [], function($request) { | |
return new lithium\action\Response([ | |
'location' => ['Products::view', 'id' => $request->params['id']], | |
'status' => 301 | |
]); | |
}); | |
// Permanent redirect of old user files | |
Router::connect('/userfiles/{:path}', [], function ($request) { |
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
Validator::add('validShippingDate', function($value, $format, $options) { | |
$validDates = array( | |
date('Y-m-d', time()), | |
date('Y-m-d', time() + 60*60*24), | |
date('Y-m-d', time() + 2*60*60*24), | |
date('Y-m-d', time() + 3*60*60*24), | |
date('Y-m-d', time() + 4*60*60*24), | |
date('Y-m-d', time() + 5*60*60*24), | |
date('Y-m-d', time() + 6*60*60*24), | |
date('Y-m-d', time() + 7*60*60*24) |
NewerOlder