Skip to content

Instantly share code, notes, and snippets.

Avatar

WILKIE MikeWilkie

View GitHub Profile
View maintenance.sh
#! /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! *
View brewup.sh
#!/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;
View youtube-dl playlist download
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 Aug 29, 2015
Zend Filter for Class Names
View zendFormatClassName
/**
*
* Format Class Name
*
**/
public function mwFormatClassName($string,$sep='-') {
$filterChain = new Zend_Filter();
$filterChain->prependFilter(new Zend_Filter_StripTags())
@MikeWilkie
MikeWilkie / pngtojpg.php
Created Oct 30, 2014
Magento png to jpg
View pngtojpg.php
<?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));
View aws-ssl.markdown

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

View nginx-update
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 ../
View gist:afe418e339133cca7d15
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 Nov 28, 2018
Magento – Disable Excessive Logging and Reporting in app/etc/local.xml
View local.xml
<?xml version="1.0"?>
<!-- license -->
<config>
<global>
<!-- global config -->
</global>
<frontend>
<events>
<!-- disble logs -->
<controller_action_predispatch>
You can’t perform that action at this time.