Skip to content

Instantly share code, notes, and snippets.

View spence-man's full-sized avatar

Spencer Mandzik spence-man

View GitHub Profile
@spence-man
spence-man / xml -res-req-xml
Last active July 31, 2020 18:09
infs-xml-res-req
# Request Headers
{
"User-Agent" => "Infusionsoft-1.2.2 (RubyGem)",
"Content-Type" => "text/xml; charset=utf-8",
"Content-Length" => "3817",
"Connection" => "keep-alive"
}
# Request Body
@spence-man
spence-man / populate-infs-form.js
Last active July 17, 2020 22:12
populate-infs-form.js
<script>
// ref: https://community.infusionsoft.com/t/is-there-a-way-to-pre-fill-an-order-form/10713/9
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
@spence-man
spence-man / settings.txt
Last active April 20, 2020 19:01
VS Code settings.json
{
// https://dev.to/andrewmcodes/ruby-on-rails-development-with-vs-code-p1i
// EDITOR
"editor.tabSize": 2,
"editor.fontSize": 16,
"editor.cursorStyle": "underline",
"editor.cursorBlinking": "expand",
"editor.formatOnSave": true,
"editor.rulers": [120],
#EXTM3U
## MUSIC
#EXTINF:-1,95bFM Auckland, New Zealand
https://ssl.geckohost.nz/proxy/caitlinssl?mp=/stream
#EXTINF:-1,KCRW 89.9FM Music Stream Santa Monica, CA
http://kcrw.streamguys1.com/kcrw_192k_mp3_e24_internet_radio
#EXTINF:-1,KEXP 90.3FM Seattle, Washington
https://kexp-mp3-128.streamguys1.com/kexp128.mp3
[playlist]
File1=http://37.59.28.208:8058/stream
Title1=95bFM Auckland, New Zealand
Length1=-1
File2=http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
Title2=BBC Radio 1
Length2=-1
@spence-man
spence-man / sample.php
Last active August 28, 2017 21:44
WordPress Log Function
######################################################################################################### */
# Custom Log function stored in /chap-press/log/log_helpers.php
function log_print(){
$open_log = "";
$open_log = str_repeat("==========",10) . "\n";
$open_log .= "[" . date('d-M-Y H:i:s e') . "]" . ": \n";
$open_log .= "Logged from the wp-config.php file \n";
$open_log .= str_repeat("==========",10) . "\n";
error_log($open_log, 3, __DIR__ . "/../public/wp-content/debug.log");