Skip to content

Instantly share code, notes, and snippets.

View BurningDog's full-sized avatar

Roger Saner BurningDog

View GitHub Profile
@BurningDog
BurningDog / MyLoggerService.php
Created September 10, 2020 08:26
Symfony 4.4: using a Logger inside a Service
<?php
namespace App\Service;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
class MyLoggerService implements LoggerAwareInterface
{
private LoggerInterface $logger;
@BurningDog
BurningDog / machine.js
Last active July 13, 2020 15:15
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@BurningDog
BurningDog / Hi.jpg
Last active July 13, 2020 14:49 — forked from ryanlucas/Hi.jpg
Image Prototype Demo
Hi.jpg
Cruises
View 1 available dates -> Cruise booking
Current -> Traveller
Cruise booking&
Itinerary
Hide full itinerary
Itinerary details -> Show full itinerary
Show full itinerary
Itinerary details -> Hide full itinerary
Cruises
View 1 available dates -> API call Get available pricing
Current -> Pick your cabin experience
API
API call Get available pricing
Success -> Cruise booking
API call POST set pricing
Success -> Traveller
API call calculate cabin price
const fetchMachine = Machine({
id: "root",
states: {
"Say Thanks": {
id: "Say Thanks",
states: {
"View message": {
id: "View message",
states: {},
on: {
@BurningDog
BurningDog / config.yaml
Last active May 17, 2018 09:30 — forked from pkuczynski/parse_yaml.sh
Replace local Wordpress database (running inside Homestead) with production database
prod:
# ssh authentication details
ssh: user@example.com
# path to wordpress on the server
wordpress: path/to/wordpress
# path to backups folder on the server (must exist)
backups: backups
# production url
url: www.example.com
diff --git a/web/wp/wp-includes/load.php b/web/wp/wp-includes/load.php
index c7a46de..f52539e 100644
--- a/web/wp/wp-includes/load.php
+++ b/web/wp/wp-includes/load.php
@@ -318,7 +318,7 @@ function wp_debug_mode() {
}
if ( WP_DEBUG ) {
- error_reporting( E_ALL );
+ error_reporting( E_ALL & ~E_DEPRECATED);
@BurningDog
BurningDog / CountourFinder.cpp
Created August 15, 2013 11:50
Kinect returning invalid depth values for the centre of a blob when the x,y co-ordinates are outside of a very small range
//--------------------------------------------------------------------------------
int ContourFinder::findContours( ofxCvGrayscaleImage& input, ofxDepthGenerator& depth,
int camWidth,int camHeight,
int nearThreshold, int farThreshold,
int minArea,
int maxArea,
int nConsidered,
double hullPress,
bool bFindHoles,
bool bUseApproximation) {