Skip to content

Instantly share code, notes, and snippets.

View bayareawebpro's full-sized avatar
✔️
Available for Consulting

Dan Alvidrez bayareawebpro

✔️
Available for Consulting
View GitHub Profile

Boss Pedals - Configuration Notes

Map ES-5 Bank to DD-500 Phrase Sampler

This configuration will allow you to bank-select switch #1 which toggles the phrase recorder and provides mappings that control the DD-500's phrase recorder in a "fumble-free" way with one switch for each function while the rest of your gear can be switched on or off by banking to other patches once a loop has been recorded. Banking back to switch #1 will exit the recorder.

Note: The DD-500 will ignore some CC midi messages while the phrase recorder is displayed and for a

@bayareawebpro
bayareawebpro / forge.sh
Created April 30, 2020 00:01
Laravel Forge Setup Script
#
# REQUIRES:
# - server (the forge server instance)
# - event (the forge event instance)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - callback (the callback URL)
#
@bayareawebpro
bayareawebpro / vue-bind-dom-mods.md
Last active April 29, 2020 04:49
VueJS Binding External DOM Modifications

Vue Directive | Listen to External Dom Value Changes

Vue doesn't recognize the input change because the script is directly setting the input value at random intervals using the DOM. So, here's my solution in the form of a directive that will hook into the Element Descriptor and emit an input event so Vue will bind the new value to the form's v-model.

It can use a custom event or other element type as well.

Example (3rd Party Script):

element.value = x //Does not trigger the v-model update
<?php
namespace App\Concerns;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
trait Resourceable
{
public function toResourceArray(?string $class = null, ?Request $request = null): array

Registering Providers (within application.js)

// Services/VueServiceProvider.js

this.load(require.context('./Services', true, /\.*ServiceProvider.js$/))
    .each((name, abstract) => this.register(abstract))

Binding Middleware

[program:provisioner-worker]
process_name=%(program_name)s
command=php /Users/builder/Sites/provisioner/artisan horizon
stdout_logfile=/Users/builder/Sites/provisioner/storage/logs/worker.log
redirect_stderr=true
autorestart=true
autostart=true
user=builder
[program:provisioner-websockets]
<script>
window.addEventListener('beforeunload', function (e) {
// Cancel the event
e.preventDefault();
// Chrome requires returnValue to be set
e.returnValue = '';
// This message may not be shown to the user / vendor specific message may be used...
window.confirm("Are you sure?");
});
</script>

Usage

<v-form-control
    type="text"
    name="name"
    label="Name"
    v-model="entity.name"
    @change="isInvalid = false"
    :invalid="isInvalid"
<?php declare(strict_types=1);
namespace App\Services;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\RequestOptions;
use GuzzleHttp\Exception\RequestException;
class ApiClient
<script>
/**
* @property validator
**/
import Ace from "ace-builds/src-noconflict/ace";
import "ace-builds/webpack-resolver";
export default {
props: {
value: {