Skip to content

Instantly share code, notes, and snippets.

View dmyers's full-sized avatar

Derek Myers dmyers

View GitHub Profile
@cvladan
cvladan / README.md
Last active July 19, 2023 02:19
Fixed "CSS to Tailwind" Chrome Extension

I have corrected the original extension CSS To Tailwind to make it work again, but how long it will continue to work remains to be seen.

To install the modified extension, please follow these steps:

  1. Download the .zip file css-to-tailwind-2.0.0.0-fixed.zip from this Gist.
  2. Unzip the file and save it somewhere on your computer.
  3. Remove the existing "official" version of the extension, which is not working anyway.
  4. Open Google Chrome and go to the "Extensions" page. You can access the Extensions page by entering chrome://extensions in the address bar.
  5. Enable "Developer mode" by toggling the switch in the top right corner of the page.
  6. Click on the "Load Unpacked" button that appears in left area.
@nathansmith
nathansmith / [1] README.md
Last active April 23, 2023 14:19
Node script to extract unique domains from a `*.har` file.

How to use

To use this Node script:

  1. Save the contents of the script in a file named har-domain-parser.cjs.

  2. Place your trace.har file in the same directory as the script file.

  3. Then run the script using the command line.

@seeliang
seeliang / lint-only-changed-files.MD
Last active April 10, 2024 09:44
How to lint only changed files?

find out the differences

use git diff to generate file list

git diff --name-only master

limited to certain file types

add ext filter

@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active May 16, 2024 15:55
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@sarthology
sarthology / regexCheatsheet.js
Created January 10, 2019 07:54
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@avargas
avargas / hail-worker@.service
Created November 9, 2018 01:12
systemd service for php worker
[Unit]
Description=pdr worker serivice @ %I
After=network.target
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/php /app/live/bin/run-worker
ExecReload=/bin/kill -HUP $MAINPID
@ahmadawais
ahmadawais / flywheel-local-xdebug-vscode.md
Last active May 3, 2024 12:07
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
@bcnzer
bcnzer / postman-pre-request.js
Last active May 14, 2024 08:23
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',