Skip to content

Instantly share code, notes, and snippets.

@helmithejoe
helmithejoe / 0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch
Created July 21, 2017 02:30 — forked from renttek/0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch
Bugfix for Zend Framework 1 in Magento (>= 1.7.*.*) + PHP 5.6
From 473846959772d8160b34b92ae3bcecddf24b972f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20Nu=C3=9F?= <julian.nuss@outlook.com>
Date: Tue, 23 Sep 2014 21:07:29 +0200
Subject: [PATCH 1/1] [BUGIFX] Zend Framework 1 + PHP5.6
---
lib/Zend/Locale/Format.php | 22 +++++++++++-----------
lib/Zend/Service/Audioscrobbler.php | 6 +++---
lib/Zend/Service/Technorati.php | 6 +++---
lib/Zend/Validate/Hostname.php | 4 ++--
@helmithejoe
helmithejoe / installer.sh
Created August 5, 2017 07:21 — forked from pjkelly/installer.sh
Installing PHPUnit via Pear on Ubuntu Lucid
# Uninstall any pre-existing packaged
# versions of phpunit
sudo apt-get remove phpunit
# Install pear via apt-get
sudo apt-get install php-pear
# Update existing pear channels
sudo pear channel-update pear.php.net
@helmithejoe
helmithejoe / opcache.ini
Created August 12, 2017 16:31 — forked from tegansnyder/opcache.ini
OpCache settings for Magento on PHP 5.5.14. Store this file as /etc/php.d/opcache.ini
; Enable Zend OPcache extension module
zend_extension=opcache.so
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=0
; The OPcache shared memory storage size.
@helmithejoe
helmithejoe / yii.nginx.conf
Created October 10, 2017 02:25 — forked from aqlx86/yii.nginx.conf
Yii +Nginx + PHP-FPM configuration
server {
set $host_path "/var/www/yoursite.com";
access_log /var/www/yoursite.com/log/access.log main;
server_name yoursite.com www.yoursite.com;
root $host_path/htdocs;
set $yii_bootstrap "index.php";
@helmithejoe
helmithejoe / gist:390856cd60ae98b01f5301fe8140698c
Created February 26, 2018 09:56 — forked from djangofan/gist:3113588
Cron job script to give a disk space usage alert email
#!/bin/sh
# this script was initially written for Redhat/CentOS
# file is /etc/cron.daily/diskAlert.cron
# requires enabling outgoing sendmail from localhost to a valid
# smtp server, which is usually disabled by default
ADMIN="jausten@adomain.com,another@adomain.com"
THRESHOLD=90
df -PkH | grep -vE '^Filesystem|tmpfs|cdrom|media' | awk '{ print $5 " " $6 }' | while read output;
do
@helmithejoe
helmithejoe / skeleton-daemon.sh
Created March 29, 2018 06:45 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@helmithejoe
helmithejoe / Dockerfile
Created December 4, 2018 03:48 — forked from michaelneu/Dockerfile
docker-compose configuration for PHP with NGINX and MySQL, including sendmail, MailDev and phpmyadmin
# see https://github.com/cmaessen/docker-php-sendmail for more information
FROM php:5-fpm
RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mysql mysqli sysvsem
RUN pecl install xdebug-2.5.5 \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@helmithejoe
helmithejoe / download_ftp_tree.py
Created January 15, 2019 03:55 — forked from Jwely/download_ftp_tree.py
recursive ftp directory downloader with python
import ftplib
import os
import re
"""
MIT license: 2017 - Jwely
Example usage:
``` python
import ftplib
@helmithejoe
helmithejoe / docker-cleanup-resources.md
Created August 13, 2019 07:52 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@helmithejoe
helmithejoe / curl_example.cpp
Created December 3, 2019 09:33 — forked from alghanmi/curl_example.cpp
cURL C++ Example
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}