Skip to content

Instantly share code, notes, and snippets.

Refused to connect to 'ws:<URL>/graphql' because it violates the following Content Security Policy directive: "connect-src 'self' <URL> ws://localhost:* <URL> <URL> <URL> <URL> <URL> <URL>".
5C:\Users\mwidmann\AppData\Local\Programs\Local\resources\app.asar\node_modules\@getflywheel\local-components\dist\index.js:1 Error: Invalid package C:\C:\Users\mwidmann\AppData\Local\Programs\Local\resources\app.asar
at createError (electron/js2c/asar_bundle.js:5)
at Object.<anonymous> (electron/js2c/asar_bundle.js:5)
at C:\Users\mwidmann\AppData\Local\Programs\Local\resources\app.asar\node_modules\@getflywheel\local-components\dist\index.js:1
at Object.t.default (C:\Users\mwidmann\AppData\Local\Programs\Local\resources\app.asar\node_modules\@getflywheel\local-components\dist\index.js:1)
at Object.<anonymous> (C:\Users\mwidmann\AppData\Local\Programs\Local\resources\app.asar\node_modules\@getflywheel\local-components\dist\index.js:1)
at n (C:\Users\mwidmann\AppData\Local\Programs\Local\resources\
@mwidmann
mwidmann / machine.js
Created March 9, 2020 09:23
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { registerBlockType } from '@wordpress/blocks';
import { RichText } from '@wordpress/blockEditor';
registerBlockType( 'russmedia/nordstern-lead', {
title: __( 'Lead', 'russmedia-nordstern-gutenberg' ),
icon: 'editor-table',
@mwidmann
mwidmann / profile.json
Last active May 19, 2019 14:11
Microsoft Terminal Configuration
{
"defaultProfile": "{41eedec7-c115-4d9b-b3af-6d6b9aa038fb}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"profiles": [
{
"guid": "{41eedec7-c115-4d9b-b3af-6d6b9aa038fb}",
[automount]
root = /
options = "metadata"
@mwidmann
mwidmann / add_local_trusted_ca_for_valid_https.md
Last active March 22, 2024 10:30
Generating trusted SSL keys for development

Generating SSL keys for development

Installation

Thanks to minica it is very easy to create trusted SSL certificates that have a very long expiration date.

In order to get started you have to have the go tools installed and set up correctly in your environment.

Setup

#!/usr/bin/perl -w
foreach $argnum (0 .. $#ARGV) {
my $curr = $ARGV[$argnum];
my $replaced = $curr =~ s/\\/\//gr;
$replaced =~ s|^([A-Za-z])\:/(.*)$|/$1/$2|;
print "$replaced ";
}
<?php
echo "Loading autoloader...";
require '/opt/app-root/src/vendor/autoload.php';
echo "Registering predis...";
Predis\Autoloader::register();
echo "Creating client...";
// Parameters passed using a named array:
$client = new Predis\Client([
'host' => '**DNS**',
'port' => **PORT**,
@mwidmann
mwidmann / php.json
Last active April 9, 2018 13:05
Custom php snippets for Visual Studio Code
{
"PHPUnit Testcase": {
"prefix": "testcase",
"body": [
"",
"use Illuminate\\Foundation\\Testing\\WithoutMiddleware;",
"use Illuminate\\Foundation\\Testing\\DatabaseMigrations;",
"use Illuminate\\Foundation\\Testing\\DatabaseTransactions;",
"",
"class ${TM_FILENAME_BASE} extends TestCase",