Because Chrome DevTools snippets don't get saved...boo
also, for good reference: http://anti-code.com/devtools-cheatsheet/
void Main() | |
{ | |
// https://stackoverflow.com/questions/150750/hashset-vs-list-performance/13089134?noredirect=1#comment76605526_13089134 | |
test(10, 5, 10, true); | |
test(20); | |
test(50); | |
test(100); | |
test(1000); | |
switch($_SERVER['HTTP_HOST']) { | |
case 'wp.sandbox:81': | |
define('DB_NAME', 'YOURDB');/** The name of the database for WordPress */ | |
define('DB_USER', 'YOURUSER');/** MySQL database username */ | |
define('DB_PASSWORD', 'YOURPASS');/** MySQL database password */ | |
define('DB_HOST', 'localhost');/** MySQL hostname */ // may need to use actual computer ip in some cases | |
break; | |
default: | |
define('DB_NAME', 'YOURDB');/** The name of the database for WordPress */ | |
define('DB_USER', 'YOURUSER');/** MySQL database username */ |
[Default Text] | |
FileNameExtensions=txt; text; wtx; log; asc; doc | |
Default Style=font:DejaVu Sans Mono; size:10; fore:#F8F8F2; back:#000000 | |
Margins and Line Numbers=size:-2; fore:#BCBCBC; back:#3B3A32 | |
Matching Braces=size:+1; bold; fore:#000000; back:#FD971F | |
Matching Braces Error=size:+1; bold; fore:#F8F8F0; back:#F92672 | |
Control Characters (Font)=size:-1 | |
Indentation Guide (Color)=fore:#A0A0A0 | |
Selected Text (Colors)=fore:#F8F8F2; back:#49483E; eolfilled | |
Whitespace (Colors, Size 0-5)=fore:#AA2B00 |
Because Chrome DevTools snippets don't get saved...boo
also, for good reference: http://anti-code.com/devtools-cheatsheet/
<?php | |
/* | |
Plugin Name: Dev Debug Me | |
Plugin URI: https://codex.wordpress.org/Debugging_in_WordPress | |
Description: Just some developer includes for debugging. Not actually a plugin; activate to test log writing. | |
Author: zaus | |
Version: 0.1 | |
Author URI: https://gist.github.com/zaus/35c1deb8ead5baa6fc40 | |
*/ |
void Main() | |
{ | |
var headers = new System.Net.WebHeaderCollection(); | |
headers.Add("xxx", "yyy"); | |
headers.Add("zzz", "f&&ff"); | |
headers.Add("xxx", "ttt"); | |
headers.Add("yyy", "33,3"); | |
headers.Dump("raw"); | |
headers.ToString().Dump("string'd"); |
/** | |
* Compare versions of objects and warn of differences | |
* @param {object} v1 variant 1 | |
* @param {object} v2 variant 2 | |
* @param {bool} stringify optionally (if provided and `true`) stringify the variant parameters when dumping | |
* @param {string} root [internal use] nested key placeholder | |
* @example <caption>Example comparing two things:</caption> | |
* // should result in warnings for 'foo' and 'somebool' | |
* compObj({foo: "bar", id: 123, somebool: true}, {bar: "foo", id: 123, somebool: 'true'}); | |
* @returns {void} nothing -- see console logging |
I liked the colors, but didn't like the Flash plugin on http://flatuicolors.com/.
And 100% JS, for no reason other than it's fun.
Generating a maze with a simple algorithm
A Pen by Gabriel Valfridsson on CodePen.
A simple platform game engine, the map is customisable and scriptable. Refer to the comments in the "map" variable for instructions.
I plan to expand the engine in the future, the ability to use images for tiles and the player is one thing that I have in mind. Any suggestions are welcome.