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
🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦 | |
🟦🟦🟦🟨🟨🟨🟨🟦🟦🟦🟦 | |
🟦🟦🟨🟨🟨🟨⬛🟨🟦🟦🟦 | |
🟦🟨🟨⬛🟨🟨⬛🟨🟨🟦🟦 | |
🟦🟨🟨⬛🟨🟨🟨🟨🟨🟦🟦 | |
🟦🟨🟨🟨🟨🟨🟨🟨🟨🟦🟦 | |
🟦🟨🟨🟨⬛⬛🟧🟧🟨🟦🟦 | |
🟦🟦🟨🟨🟧🟧🟧🟧🟧🟧🟦 | |
🟦🟦🟦🟨🟨🟨🟨🟧🟧🟧🟦 | |
🟦🟦🟦🟦🟦🟦🟦🟧🟧🟦🟦 |
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 | |
$pages = new query_loop( array( | |
'post_type' => 'page' | |
)); | |
foreach( $pages as $id => $post ) { | |
the_title(); | |
// etc... | |
} |
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
add_filter("mce_external_plugins", "tomjn_mce_external_plugins"); | |
function tomjn_mce_external_plugins($plugin_array){ | |
$plugin_array['typekit'] = get_template_directory_uri().'/typekit.tinymce.js'; | |
return $plugin_array; | |
} |
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
==> default: Running provisioner: utility-mte90-tideways (shell)... | |
default: Running: /var/folders/jx/3t2z3sgx7sb3mwlml6v2xskh0000gp/T/vagrant-shell20190115-33101-1pdjm18.sh | |
default: Installing Tideways & XHgui | |
default: File copied for php 7.0 | |
default: cp: | |
default: cannot stat ‘/home/vagrant/tideways.ini’ | |
default: : No such file or directory | |
default: cp: | |
default: cannot stat ‘/home/vagrant/mongodb.ini’ | |
default: : No such file or directory |
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 | |
function toms_addition_endpoint( \WP_REST_Request $request ) { | |
$result = $request['a'] + $request['b']; | |
return rest_ensure_response( $result ); | |
} | |
function toms_addition_routes() { | |
register_rest_route( 'tomjn/v1', '/addition', array( |
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
DataStore = { | |
data = {}, | |
subscribers = {} | |
} | |
function DataStore:new (o) | |
o = o or {} -- create object if user does not provide one | |
setmetatable(o, self) | |
self.__index = self | |
return o | |
end |
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 | |
require_once( 'custom_page.php' ); | |
class Hello_World_Page extends Tomjn_Custom_Page { | |
public function render_page() { | |
echo 'hello world!'; | |
} | |
} |
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 | |
/** | |
* A helper class to implement arbitrary content at arbitrary URLs without a supporting post or page. | |
* Inherit from this class and implement the render_page method | |
* | |
* @author: Tom J Nowell ww.tomjn.com | |
* @License: GPL 2+ | |
*/ | |
abstract class Tomjn_Custom_Page { |
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
ai = .... | |
p = {x=0,y=0,z=0} | |
units = UnitQuery( ai, { | |
within={ | |
position=p | |
radius=100 | |
}, | |
canMove=false | |
}) |
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
PlacementHandler = class(Module) | |
function PlacementHandler:Name() | |
return "PlacementHandler" | |
end | |
function PlacementHandler:internalName() | |
return "placementhandler" | |
end |