Skip to content

Instantly share code, notes, and snippets.

View MACscr's full-sized avatar

Mark Chaney MACscr

View GitHub Profile
@joyrexus
joyrexus / README.md
Last active June 19, 2024 09:35 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@salcode
salcode / .gitignore
Last active July 15, 2024 17:12
.gitignore file for a general web project - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# https://salferrarello.com/starter-gitignore-file/
# ver 20221125
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@igrr
igrr / OTATest.ino
Created June 11, 2015 15:24
ESP8266 Arduino OTA example v1
#include <ESP8266WiFi.h>
#include <WiFiUDP.h>
const char* ssid = "..........";
const char* password = "...........";
WiFiUDP listener;
void setup() {
Serial.begin(115200);
@adamjstevenson
adamjstevenson / connect_sub.php
Created October 23, 2015 21:59
PHP Stripe Connect subscription flow
<?php
// Create a customer and subscribe them to a plan on a connected account -- should add some error handling
// Set your secret key -- generally this should be stored in a config file or ENV variable separate from this code
\Stripe\Stripe::setApiKey(PLATFORM_SECRET_KEY);
$token = $_POST['stripeToken'];
$acct = "acct_yourConnectedAcctID";
// Create a customer on the connected account
@fevangelou
fevangelou / my.cnf
Last active May 25, 2024 19:49
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 December 2021 ~
#
#
# 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.
#
function dq($query){
$sql = $query->toSql();
foreach($query->getBindings() as $key => $binding){
$sql = preg_replace('/\?/', "'$binding'", $sql, 1);
}
dd($sql);
}