sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| <?php | |
| require 'vendor/autoload.php'; | |
| use SebastianBergmann\CodeCoverage\Filter; | |
| use SebastianBergmann\CodeCoverage\Driver\Selector; | |
| use SebastianBergmann\CodeCoverage\CodeCoverage; | |
| use SebastianBergmann\CodeCoverage\Report\PHP as PhpReport; | |
| use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; | |
| $filter = new Filter; |
| // Install npm i pg-mem --save-dev | |
| import { DataSource, Repository } from 'typeorm'; | |
| import { newDb, DataType } from 'pg-mem'; | |
| import { v4 } from 'uuid'; | |
| const setupDataSource = async () => { | |
| const db = newDb({ | |
| autoCreateForeignKeyIndices: true, | |
| }); |
| /** | |
| * Open the floating messages panel in the bottom right-hand corner of the LinkedIn screen. Click | |
| * the three dots and select "Manage messages." Scroll down the page a few times so as to load several | |
| * screens of messages (but not too many). The paste the following script into the developer console | |
| * and press enter. | |
| * | |
| * All of the messages on your screen should now be selected. You can choose the "Delete" option to delete | |
| * all of them in bulk. | |
| */ | |
| (() => { |
| <?php | |
| // CASH PAYMENT GATEWAY | |
| /** | |
| * Add the gateway to WC Available Gateways | |
| * | |
| * @since 1.0.0 | |
| * @param array $gateways all available WC gateways | |
| * @return array $gateways all WC gateways + offline gateway |
| const fs = require("fs"); | |
| const kb = 32 * 1024; | |
| const buf = Buffer.alloc(kb); | |
| const ws = fs.createWriteStream("out.bin") | |
| buf.fill(0xEA) | |
| ws.write(buf); | |
| ws.end(); |
Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.
Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the Windows Terminal).
It should look something like the content below; call it my-site.conf or something like that.
| //Change AO folder and file prefix | |
| //It's mandatory to have an underline | |
| //serve files from e.g. /wp-content/resources/aggregated_12345.css | |
| //wp_config.php | |
| define('AUTOPTIMIZE_CACHE_CHILD_DIR','/resources/'); | |
| define('AUTOPTIMIZE_CACHEFILE_PREFIX','aggregated_'); | |
| //Enable non-ASCII characters | |
| add_filter('autoptimize_filter_main_use_mbstring', '__return_true'); |
| // This function matches all non-ASCII characters after splitting the string in a "unicode-safe" way (using `[...str]`). | |
| // It then splits each unicode character up into its code-points, and gets the escape code for each, and then joins all | |
| // all the ASCII characters and Unicode escapes into one string. | |
| function escapeUnicode(str) { | |
| return [...str].map(c => /^[\x00-\x7F]$/.test(c) ? c : c.split("").map(a => "\\u" + a.charCodeAt().toString(16).padStart(4, "0")).join("")).join(""); | |
| } | |
| // Based on discussion in this thread: https://gist.github.com/mathiasbynens/1243213 |
| # ######################################################################################### | |
| # GIT AND BASH ALIASES DEFINITION IN A SINGLE FILE `.BASH_ALIASES` WITH GIT AUTO-COMPLETION | |
| # ######################################################################################### | |
| # All these git commands and bash aliases are tested on git version 2.17.1 on Linux Mint 19 | |
| # This compilation of aliases is an experiment. | |
| # On a daily basis, I use only a few of these aliases ¯\_(ツ)_/¯ | |
| # ********** |