Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
# =====================================================
# * macOS Maintenance Script *
# * Written by Kristan M. Kenney (iCeFuSiOn) *
# * Modified by Mike Wilkie (github.com/MikeWilkie) *
# * Last modified on May 1, 2018 06:05:18 PM EST *
# * Revision 1.0.1c *
# * For use on macOS 10.13 High Sierra Only! *
# * I AM NOT RESPONSIBLE IF YOU DO SOMETHING WRONG! *
#!/bin/bash
# To install:
# add to ~/Scripts/
# add "alias brewup='~/Scripts/brewup.sh'" to ~/.bash_profile
brew update -a; brew upgrade -a; brew prune; brew cleanup; brew cu -a -y; brew cask cleanup; brew doctor;
youtube-dl -x --audio-format mp3 --audio-quality 0 --add-metadata --metadata-from-title "%(artist)s - %(title)s" --output "%(autonumber)s-%(title)s.%(ext)s" --embed-thumbnail [URL]
@MikeWilkie
MikeWilkie / zendFormatClassName
Last active August 29, 2015 14:18
Zend Filter for Class Names
/**
*
* Format Class Name
*
**/
public function mwFormatClassName($string,$sep='-') {
$filterChain = new Zend_Filter();
$filterChain->prependFilter(new Zend_Filter_StripTags())
@MikeWilkie
MikeWilkie / pngtojpg.php
Created October 30, 2014 14:32
Magento png to jpg
<?php
require_once '../app/Mage.php';
umask(0);
Mage::app('');
function dupeImage($path) {
$img = imagecreatefrompng($path);
$new = str_replace('.png','.jpg',$path);
$bg = imagecreatetruecolor(imagesx($img), imagesy($img));
@MikeWilkie
MikeWilkie / aws-ssl.markdown
Last active August 6, 2016 00:01
AWS Custom SSL

Combine your certificate file with the private key used to create your CSR file:

cat {certificateFile}.crt private-key.pem > host.pem

Encode the combined file from the previous step in x509 PEM format:

openssl rsa -in host.pem -out nopassphrase.pem

@MikeWilkie
MikeWilkie / nginx-update
Last active November 15, 2016 22:54
Recompile & Update nginx as confgured for https://github.com/MikeWilkie/EPEL-LEPP-Configuration
cd ~/git/nginx
rm -rf nginx-1*
rm -rf openssl-1*
wget https://www.openssl.org/source/openssl-1.0.1u.tar.gz
wget http://nginx.org/download/nginx-1.11.6.tar.gz
tar xzvf openssl* && rm -rf openssl-1.0.1u.tar.gz
tar -xzvf nginx-1*.tar.gz
rm -rf nginx-1*.tar.gz
cd echo-nginx-module && git pull && cd ../
cd headers-more-nginx-module && git pull && cd ../
@MikeWilkie
MikeWilkie / gist:afe418e339133cca7d15
Last active August 29, 2015 14:02
Axivo SSL Setup
rpm -ivh --nosignature http://rpm.axivo.com/redhat/axivo-release-6-1.noarch.rpm
sed -i '0,/enabled=0/s//enabled=1/' /etc/yum.repos.d/axivo.repo
sed -i "s/gpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-AXIVO/gpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-AXIVO\nincludepkgs=openssl*/" /etc/yum.repos.d/axivo.repo
yum install openssl openssl-libs openssl-devel openssl-static -y
yum update openssl openssl-libs openssl-devel openssl-static -y
yum update openssl -y
@MikeWilkie
MikeWilkie / local.xml
Last active November 28, 2018 04:47
Magento – Disable Excessive Logging and Reporting in app/etc/local.xml
<?xml version="1.0"?>
<!-- license -->
<config>
<global>
<!-- global config -->
</global>
<frontend>
<events>
<!-- disble logs -->
<controller_action_predispatch>