Skip to content

Instantly share code, notes, and snippets.

View davidangel's full-sized avatar
😇
👍

David Angel davidangel

😇
👍
View GitHub Profile
@davidangel
davidangel / config.txt
Last active July 13, 2019 17:30
Elecrow 5 inch Touch Screen 800x480 - RetroPie Config
# /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
dtparam=audio=on
config_hdmi_boost=4
disable_overscan=1
hdmi_cvt 800 480 60 6 0 0 0
hdmi_group=2
hdmi_mode=87

Creating an Epub from AsciiDoc

Install

brew install asciidoctor && brew install pandoc

Generate

@davidangel
davidangel / azure.php
Created June 22, 2017 16:51
Azure Connection Config for use with Laravel
<?php
$azureConnectionInfo = getenv("MYSQLCONNSTR_localdb");
$connectionInfoEntries = preg_split('/;/', $azureConnectionInfo);
$connectionKeys = [];
array_walk($connectionInfoEntries, function ($entry) use (&$connectionKeys) {
list($name, $value) = preg_split("/=/", $entry);
$connectionKeys[$name] = $value;
});
@davidangel
davidangel / boot-config.txt
Last active September 16, 2017 16:45
Raspberry Pi - /boot/config.txt
# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1
@davidangel
davidangel / magento2_toggle_template_hints.sql
Created March 31, 2017 15:05
Magento 2 Query: Toggle Template Hints
-- toggle template hints in Magento 2
UPDATE core_config_data
SET `value` =NOT `value`
WHERE path in(
'dev/debug/template_hints_storefront',
'dev/debug/template_hints_admin',
'dev/debug/template_hints_blocks'
);
@davidangel
davidangel / Magento2ValetDriver.php
Last active March 21, 2017 14:51
Magento 2 Driver for Laravel Valet (adapted from: https://github.com/lexbeelen/laravel-valet-magento2)
<?php
class Magento2ValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
@davidangel
davidangel / useful_linux_commands.md
Last active February 21, 2017 12:46
Useful Linux Commands

Useful Linux Commands

Memory

To see what processes are running on your machine, sorted by their memory usage, run the following command:

ps aux | awk '{print $2, $4, $11}' | sort -k2rn | head -n 15

@davidangel
davidangel / laravel-valet.md
Last active October 18, 2016 12:26
Dev Environments

Up and running with Laravel Valet

Prerequisites:

Install Valet:

Read More Toggle

I wanted to create a simple, jQuery-only, solution for a flexible 'Read/Show More' link solution. The minimum requirements in your markup are simply to wrap your hidden/extended content in a div with a data-readmore attribute. You can customize the text using the data-open-text and data-close-text attributes.

A Pen by David Angel on CodePen.

License.