Skip to content

Instantly share code, notes, and snippets.

View rsoury's full-sized avatar
🍓
Foraging Berries

Ryan Soury rsoury

🍓
Foraging Berries
View GitHub Profile
@fevangelou
fevangelou / my.cnf
Last active July 1, 2025 02:51
Optimized my.cnf configuration for MySQL/MariaDB (on cPanel/WHM servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on cPanel/WHM servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated September 2024 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@thewraven
thewraven / nestedArray.go
Last active July 18, 2018 14:07
Updating a nested field into an array using r.Branch
package main
import (
"fmt"
r "gopkg.in/dancannon/gorethink.v3"
)
type Commentary struct {
From string `gorethink:"from"`
@tameemsafi
tameemsafi / emails.php
Last active July 29, 2024 21:04
Send an email programmatically in wordpress with wp_mail using the woocommerce transaction emails template.
<?php
// Define a constant to use with html emails
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8'));
// @email - Email address of the reciever
// @subject - Subject of the email
// @heading - Heading to place inside of the woocommerce template
// @message - Body content (can be HTML)
function send_email_woocommerce_style($email, $subject, $heading, $message) {
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active April 9, 2026 05:34
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@cdimascio
cdimascio / Configure awscli
Last active January 20, 2023 04:05
IBM Cloud Object Storage COS with AWS CLI
cat ~/.aws/config
[default]
region = us-standard
output = json
@og24715
og24715 / httpProxyWithApiGateway.md
Last active January 10, 2020 00:07
Setting an HTTP Proxy on API Gateway by using Serverless framework.

HTTP オールスループロキシーを serverless で定義する

service: httpAllThroughProxy

provider:
  name: aws
  runtime: nodejs6.10

  stage: dev
@ve3
ve3 / Encryption.js
Last active August 10, 2023 10:51
Encrypt and decrypt between programming languages (PHP & JavaScript). (Newer version here https://gist.github.com/ve3/b16b2dfdceb0e4e24ecd9b9078042197 )
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
@ilessing
ilessing / Pandoc Markdown to PDF.md
Last active April 6, 2026 15:53
getting pandoc to generate PDF from Markdown on MacOS

Using Pandoc to generate PDFs from Markdown

on a Mac running macOS 10.13.4

To install the needed components you can use Homebrew

Two Components are needed:

@blofeldthefish
blofeldthefish / White label Route 53 nameservers.md
Created August 23, 2018 19:42
AWS Route 53 white label nameserver setup
@lukecav
lukecav / wp-config.php
Last active December 30, 2021 09:25
iThemes Security Pro plugin constants that can be defined in a sites wp-config.php file
define(‘ITSEC_USE_CRON’, true);
define('ITSEC_DISABLE_MODULES', true);
define('ITSEC_DISABLE_TWO_FACTOR', true);
define('ITSEC_DISABLE_INACTIVE_USER_CHECK', true);
define(‘ITSEC_DEBUG’, true);