Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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;
}