Skip to content

Instantly share code, notes, and snippets.

@chris-huffman
chris-huffman / portal_styles.css
Created February 22, 2019 16:19
Hide Sensitive Data - Portal Styles
.comment[cp_visibility="0"], .comment[cp_visibility="-1"], .tracking_widget_stopwatch {
-webkit-filter: blur(6px);
opacity: 0.1;
}
.wireframe_content_wrapper:hover .comment, .tracking_widget_stopwatch:hover {
-webkit-filter: blur(0px);
opacity: 1;
}
@chris-huffman
chris-huffman / cli_debugging.sh
Last active January 22, 2021 20:29
Debugging from Vagrant CLI
# Generic example
export PHP_IDE_CONFIG="serverName=<host.lan>" && php -d xdebug.remote_autostart=on -f <somefile>.php -- <any PHP file CLI arguments>
# bin/magento example
export PHP_IDE_CONFIG="serverName=<host.lan>" && php -d xdebug.remote_autostart=on -f bin/magento -- <bin:magento:command> <any bin/magento command line arguments>
#### OLD WAY ####
@chris-huffman
chris-huffman / string_split.php
Created June 5, 2019 15:03
Split a string in php
$array = preg_split("/\r\n|\n|\r/", $string);
@chris-huffman
chris-huffman / curl_headers.sh
Created June 5, 2019 15:05
curl headers only
curl -D - -o /dev/null -s https://www.smkw.com
@chris-huffman
chris-huffman / codebase-tar.sh
Created August 27, 2019 17:15
Codebase tar
# From public_html run:
tar -czvf site-domain.tar.gz *
@chris-huffman
chris-huffman / kill-multiple-mysql-processes.sh
Created December 6, 2019 16:17
Delete Multiple MySQL processes
for PID in $(mysqladmin processlist | grep 'INSERT INTO `search_tmp' | awk '{ print $2; }'); do mysqladmin kill $PID; done
@chris-huffman
chris-huffman / handle-porto-files.sh
Created December 12, 2019 17:12
Handle Porto Generated Files with Capistrano
scp -r client-envir:/var/www/html/releases/{release_dir}/pub/media/porto/configed_css pub/media/porto
#git commit files
#deploy

#Rename a local and remote branch in git

  1. Checkout local branch.

  2. Rename local branch git branch -m {new-name}

  3. Delete the old-name remote branch and push the new-name local branch. git push {origin} :{old-name} {new-name}

@chris-huffman
chris-huffman / Fix-setup-db-status-issue.patch
Created January 20, 2020 21:51
M2 Github Issue 19597 Patches
# Module: cms-staging
From 92b3db5210eb6730d22d6cd3bca2c3d9fb87d46a Mon Sep 17 00:00:00 2001
From: Chris Huffman <chris.huffman@classyllama.com>
Date: Fri, 17 Jan 2020 10:52:04 -0600
Subject: [PATCH] Fix setup:db:status issue
---
etc/db_schema.xml | 3 +++
1 file changed, 3 insertions(+)
@chris-huffman
chris-huffman / setup_sourceguardian.sh
Last active January 26, 2024 18:11
Install source guardian for PHP 7.2
#Run the following commands to install SourceGuardian Loader
#The example below is for PHP 7.2. Please use the version that applies to your situation.
sudo su
mkdir /usr/local/sourceguardian
cd /usr/local/sourceguardian
curl https://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz --output loaders.linux-x86_64.tar.gz
tar xzf loaders.linux-x86_64.tar.gz
cp ixed.7.2.lin /usr/lib64/php/modules/