- Enable the tracer on your xdebug.ini file (see the
xdebug.ini
file). - If you are gonna trace an http request, make sure your
xdebug.trace_output_dir
is writable by the webserver user (www-data). - Execute your script or your request. You can use
produce_segmentation.php
to test. - See the trace file(s) on your
xdebug.trace_output_dir
.
This file contains hidden or 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
function ({ addBase, theme }) { | |
function extractColorVars(colorObj, colorGroup = '') { | |
return Object.keys(colorObj).reduce((vars, colorKey) => { | |
const value = colorObj[colorKey]; | |
const newVars = | |
typeof value === 'string' | |
? { [`--color${colorGroup}-${colorKey}`]: value } | |
: extractColorVars(value, `-${colorKey}`); |
This file contains hidden or 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
Events & Delegates | |
------------------ | |
Events and Delegates were something I struggled with when I was first learning how they worked. Once I figured it out it became one of the most useful and powerful techniques for games. Its especially useful for helping to decouple classes while allowing for messaging. | |
Delegates - Simply a container for a function that can be used as a variable. | |
Events - Allows you to specify a delegate that gets called when some event in your code is triggered. | |
Overview |
This file contains hidden or 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 | |
/** | |
* Intention: | |
* | |
* "testing" environment has a SQLite database configured | |
* Run migrations against --env=testing | |
* | |
* Separate seeds run here per test method will delete the SQLite | |
* code tables, and re-create them with codes that fit the needs |
This file contains hidden or 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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |