Skip to content

Instantly share code, notes, and snippets.

- Creation Date: (fill me in with today's date, YYYY-MM-DD)
# Summary
Brief explanation of the proposal.
# Motivation
Why are we doing this? What use cases does it support? What is the expected
outcome?
@steerpike
steerpike / Test
Created February 28, 2020 00:38
Error: Call to a member function connection() on null with PHPUnit in Laravel and Laragon
Make sure Tests created in Laravel are using:
use Tests\TestCase;
not:
use PHPUnit\Framework\TestCase;
@steerpike
steerpike / File type count
Last active February 5, 2020 09:52
Count the number of filetypes '.txt' occuring in a folder
find a/ -type f -name "*.txt" | wc -l
also
find . -type f | sed 's/.*\.//' | sort | uniq -c
@steerpike
steerpike / gist:de651c1f7eaf033383d3fb815ee3aaa7
Created December 19, 2019 00:37
Run Cypress after extracting ENV variables on a server to determine a dynamic URL
CYPRESS_baseUrl="https://$LOGNAME-op.$(grep wildcard_cname /etc/salt/grains | cut -d ' ' -f 2)" ./node_modules/.bin/cypress run
@steerpike
steerpike / gist:612bc988142970aa87df371b3909f94b
Created December 16, 2019 03:20
Share C drive on windows for Docker (powershell)
Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
@steerpike
steerpike / gist:a42308c4072c041c04b3b55bc49beb22
Created December 16, 2019 03:20
Share C drive on windows for Docker (powershell)
Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
@steerpike
steerpike / gist:c02f1087d4804d8b14844fd7a00f7d01
Created July 3, 2019 02:43
Use an @ in a password when setting a PROXY
Where a Users's password contains an @ symbol subsitute ^%40 so:
set HTTP_PROXY=http://user:p@ssword@proxy.domain.com:port
beomes:
set HTTP_PROXY=http://user:p^%40ssword@proxy.domain.com:port
@steerpike
steerpike / gist:acf55fb52f2c551ceb800d39ed08177f
Created April 5, 2019 01:15
Open Chrome without security settings to test API calls without CORS
open -a Google\ Chrome --args --disable-web-security --user-data-dir