// Single parameter
route('users/{id}', 1);
// Array of parameters
route('users/{user_id}/docs/{doc_id}', [1, 548]);
// Parameter object
| #!/usr/bin/env bash | |
| echo ">>> Installing MongoDB" | |
| mongod --version > /dev/null 2>&1 | |
| MONGO_IS_INSTALLED=$? | |
| if [ $MONGO_IS_INSTALLED -eq 0 ]; then | |
| echo ">>> MongoDB already installed" | |
| service mongod restart |
| #!/usr/bin/env bash | |
| worker="[program:worker-"$2"] | |
| command=php "$1"artisan queue:listen --sleep=10 --quiet --tries=3 --queue=default | |
| autostart=true | |
| autorestart=true | |
| user=vagrant | |
| redirect_stderr=true | |
| stdout_logfile=/home/vagrant/.workers/worker-"$2".log | |
| " |
| #!/bin/bash | |
| HOSTSFILE="/etc/hosts" | |
| BAKFILE="$HOSTSFILE.bak" | |
| DOMAINREGEX="^[a-zA-Z0-9]{1}[a-zA-Z0-9\.\-]+$" | |
| IPREGEX="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | |
| URLREGEX="^https?:\/\/[a-zA-Z0-9]{1}[a-zA-Z0-9\/\.\-]+$" | |
| PARAMETERS="$@" | |
| backup() |
| function dbbackup() { | |
| if [[ "$1" ]] | |
| then | |
| BACKUP_DIR="$1" | |
| MYSQL_USER="[USERNAME]" | |
| MYSQL_PASSWORD="[PASSWORD]" | |
| TIMESTAMP=$(date +"%F") | |
| MYSQL=/usr/bin/mysql | |
| MYSQLDUMP=/usr/bin/mysqldump |
PM2's startup service script is triggered before Vagrant mounts the local directories so none of the scripts it's tasked with starting can be found.
Use Upstart's events to trigger pm2 resurrect once local directories have been mounted.
Notice: At the time of writing, Vagrant's vagrant-mounted event is not being triggered on Ubuntu < 15.04. To fix this, you should add the following workaround:
Create a file called /etc/init/workaround-vagrant-bug-6074.conf with the following content:
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class VerifyShopifyWebhook | |
| { | |
| /** | |
| * Handle an incoming request. |
| esphome: | |
| name: "esp-ashp" | |
| on_boot: | |
| priority: -100 | |
| then: | |
| - lambda: |- | |
| esphome::modbus_controller::ModbusController *controller = id(ashp_modbus); | |
| std::vector<uint16_t> outdoor_registers = { | |
| 0x8238, // Compressor frequency | |
| 0x8204, // Outdoor temperature |
| { | |
| "keys": ["super+i"], | |
| "command": "run_macro_file", | |
| "args": {"file": "Packages/User/Macros/initialize_properties.sublime-macro"}, | |
| "context": [{"key": "selector", "operator": "equal", "operand": "source.php"}] | |
| } |
Downloads a 3MF file from a Bambu Lab printer via it's FTPS service when the printer is in LAN mode. The embedded thumbnail is then extracted from the 3MF file.
This script makes little-to-no effort to validate files exist or are in the correct format and is provided as-is. I take no responsibility for any loss of data or damages caused. Use at your own risk.
Run the script with arguments <host> <access_code> <model name>. Example: