Skip to content

Instantly share code, notes, and snippets.

View Amourspirit's full-sized avatar

:Barry-Thomas-Paul: Moss Amourspirit

  • Huntsville, Ontario, Canada
View GitHub Profile
@Amourspirit
Amourspirit / README.md
Last active January 29, 2016 17:00 — forked from jonahvsweb/README.md
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@Amourspirit
Amourspirit / gist:4b24b525214c6ef943625e8a73ee261d
Created February 22, 2017 11:54 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@Amourspirit
Amourspirit / grunt.copy.includeFile.js
Last active June 14, 2019 11:26 — forked from purtuga/grunt.copy.includeFile.js
A Grunt Copy process function to embed content of files into other files.
/**
* includeFile() - embeds a file content within another. Meant to be
* used from the copy task as a 'processContent' function. The following
* tokens can be used in files: <br>
*
* - BUILD_INCLUDE('file')
* - /* BUILD_INCLUDE('file') *\x47
* - &lt;!-- BUILD_INCLUDE("file") --&gt;
*
* In addition, options can be added to the token above that further
<?php
/**
* WooCommerce Match Canada Postal Codes
*
* Checks WooCommerce Postal Code and removes gateways if not matching Canada Postal Format
*/
add_filter( 'woocommerce_available_payment_gateways', function( $available_gateways ){
global $woocommerce;
if ( is_admin() ) {
<?php
/**
* Add WooCommerce cart to Main Menu for Divi
*
* Add WooCommerce cart icon to right of main menu
*/
// Author Paul Moss
// Created September 13 2019
// Append cart item (and cart count) to end of main menu.
@Amourspirit
Amourspirit / stringUTFArray.js
Created July 31, 2020 16:11
Functions to convert string to UTF8 Array and Array to UTF8 String
function stringToUTF8Array(str) {
let utf8 = [];
for (let i = 0; i < str.length; i++) {
let charcode = str.charCodeAt(i);
if (charcode < 0x80) utf8.push(charcode);
else if (charcode < 0x800) {
utf8.push(0xc0 | (charcode >> 6),
0x80 | (charcode & 0x3f));
}
else if (charcode < 0xd800 || charcode >= 0xe000) {
@Amourspirit
Amourspirit / QuickConda.md
Last active April 17, 2022 19:45
Conda (cheatsheet) Quick Commands

Quick Commands

Set up env
$ conda env create --prefix ./env -f environment.yml

Set up new env
$ conda create --prefix ./env python=3.10

Write env to Yaml
$ conda env export &gt; environment.yml

@Amourspirit
Amourspirit / common_color.py
Created June 3, 2022 01:20
Python Web Colors Constants
class CommonColor:
# Pink colors
MEDIUM_VIOLET_RED = 0xC71585
DEEP_PINK = 0xFF1493
PALE_VIOLET_RED = 0xDB7093
HOT_PINK = 0xFF69B4
LIGHT_PINK = 0xFFB6C1
PINK = 0xFFC0CB
# red colors
@Amourspirit
Amourspirit / vscode_sphinx_debug.md
Last active June 13, 2022 23:54
How to debug Shinx Docs in VS Code

How to debug Shinx Docs in VS Code

In VS Code add a new configuration to launch json.

Open launch.json ctl+shirt+p and type launch.json. From there you can open launch.json.

The revelent section is to add to your launch.json is Python: Sphinx Docs

{
@Amourspirit
Amourspirit / LibreOffice Virtual Environment using venv and oooenv.md
Last active May 7, 2023 16:54
General python guidelines for setting up a virtual environment to work with LibreOffice

Python LibreOffice virtual Environment

General python guidelines for setting up a virtual environment to work with LibreOffice

Note: OOO Development Tools is a python package that already does most of the heavy lifting for working with Python and LibreOffice.

Recommend reading OOO Development Tools Developer Docs

Project Setup