Install Brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install fortune
brew search fortune
| /*<?php | |
| //*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
| //\u000A\u002F\u002A | |
| class PhpJava { | |
| static function main() { | |
| echo(//\u000A\u002A\u002F | |
| "Hello World!"); | |
| }} | |
| //\u000A\u002F\u002A | |
| PhpJava::main(); |
| <?php | |
| namespace Jobs; | |
| use Illuminate\Queue\InteractsWithQueue; | |
| use Illuminate\Redis\Database as Redis; | |
| class Foo extends Job | |
| { | |
| use InteractsWithQueue; |
| /** | |
| * Inspired by XRegExp via 2ality | |
| * http://www.2ality.com/2012/12/template-strings-xregexp.html | |
| * http://xregexp.com/ | |
| */ | |
| import test from 'ava'; | |
| export function rx(flags) { | |
| const trailingComments = /\s+#.*$/gm; |
| #!/bin/sh | |
| wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.15-osx10.11-x86_64.tar.gz | |
| tar xfvz mysql-5.7* | |
| echo "stopping mamp" | |
| sudo /Applications/MAMP/bin/stop.sh | |
| sudo killall httpd mysqld | |
| echo "creating backup" |
###Secure previews of draft entries with Resource Router
Make a copy of index.php and call it preview.php. Add any custom config values in preview.php that you might like when previewing entries, such as disabling caching.
Create a rule for Resource Router that looks something like this:
$config['resource_router'] = array(
// match any url| {!-- | |
| > Awesome. Just had an Ah-ha! moment. Build small blocks, then add | |
| > multiple Block fields to a channel with specific blocks in. | |
| -- @JayHealy, https://twitter.com/JayHealey/status/598668322301837312 | |
| --} | |
| {cf_page_content} |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
| var a = [ | |
| 'a', 'aa', 'aaa', 'aaaa', 'aaaaa', | |
| 'b', 'bb', 'bbb', 'bbbb', 'bbbbb', | |
| 'c', 'cc', 'ccc', 'cccc', 'ccccc' | |
| ]; | |
| var b = [ | |
| 'Z', 'ZZ', 'ZZZ' | |
| ]; |
| <?php | |
| $plugin_info = array( | |
| 'pi_name' => 'debug_override', | |
| 'pi_version' =>'1.0', | |
| 'pi_author' =>'GDmac', | |
| 'pi_author_url' => '', | |
| 'pi_description' => '', | |
| 'pi_usage' => '{exp:debug_override override="all|ajax"} default is override on ajax calls', | |
| ); |