Skip to content

Instantly share code, notes, and snippets.

@helgatheviking
helgatheviking / add-taxonomy-to-woocommerce-export.php
Last active March 4, 2024 14:51
Add a custom taxonomy to WooCommerce import/export
<?php
/*
* Plugin Name: WooCommerce Add Taxonomy to Export
* Plugin URI: https://gist.github.com/helgatheviking/114c8df50cabb7119b3c895b1d854533/
* Description: Add a custom taxonomy to WooCommerce import/export.
* Version: 1.0.1
* Author: Kathy Darling
* Author URI: https://kathyisawesome.com/
*
* Woo: 18716:fbca839929aaddc78797a5b511c14da9
@heiswayi
heiswayi / fm.php
Created October 25, 2017 14:00
Single PHP File Manager Script - Screenshot: https://i.imgur.com/4OtrKUz.png
<?php
/**
* File Manager Script
*/
// Default language ('en' and other from 'filemanager-l10n.php')
$lang = 'en';
// Auth with login/password (set true/false to enable/disable it)
$use_auth = true;
@Shourai
Shourai / namecheap SSL.md
Created October 21, 2017 12:49
Letsencrypt SSL certificate with namecheap hosting

source: https://savedlog.com/uncategorized/letsencrypt-ssl-certificate-namecheap-hosting/

The “Positive SSL” certificate I bought along with my domain is invalid with any of my subdomains and cannot be used with wildcards. One annoying thing is that namecheap doesn’t offer auto installation of free let’s encrypt certificates, even though, they are saying “Namecheap is dedicated to data security and privacy for all internet users. We believe the movement to encrypt nearly all web traffic is a positive direction. As more sites embrace HTTPS and use of security products, providers of free SSL are beginning to come online.”

Let me show you what it needs to be done in order to “encrypt nearly all web traffic”.

First, not required but it’s helpful to enable ssh access, it is not enabled by default on the base hosting plans, just go an start a live chat and request ssh access.

@rob-smallshire
rob-smallshire / macOS-in-virtualbox.md
Last active April 3, 2024 19:03
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 6, 2024 13:53
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@giovanigenerali
giovanigenerali / postfix-gmail-macos.md
Last active December 20, 2021 20:07
Postfix Gmail relay on macOS Sierra & macOSHigh Sierra

Postfix Gmail relay on macOS Sierra & macOSHigh Sierra

1 - Create a file to store our credentials:

sudo vim /etc/postfix/sasl_passwd

2 - Add something like this:

@krnlde
krnlde / promisify-http.js
Last active February 22, 2023 03:42
util.promisify.custom and http.get example
const http = require('http');
const {promisify} = require('util');
http.get[promisify.custom] = function getAsync(options) {
return new Promise((resolve, reject) => {
http.get(options, (response) => {
response.end = new Promise((resolve) => response.on('end', resolve));
resolve(response);
}).on('error', reject);
});
#htaccess apache .htaccess file notes, last tested in Apache 2.4.26
#################
# Disable index
#################
Options -Indexes
#################
# SSI Support
#################
@simongcc
simongcc / config.rb
Last active April 25, 2017 04:36 — forked from yatil/config.rb
My standard config.rb for compass
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
# You can select your preferred output style
@DragonBe
DragonBe / php_apache_homebrew.md
Last active November 20, 2022 18:15
Installation of Apache 2.4 and PHP 7.1 with Homebrew

I posted several talks about compiling PHP from source, but everyone was trying to convince me that a package manager like Homebrew was a more convenient way to install.

The purpose of Homebrew is simple: a package manager for macOS that will allow you to set up and install common packages easily and allows you to update frequently using simple commands.

I used a clean installation of macOS Sierra to ensure all steps could be recorded and tested. In most cases you already have done work on your Mac, so chances are you can skip a few steps in this tutorial.

Apache and PHP with homebrew

I’ve made this according to the installation instructions given on GetGrav.