Find: @include\s*(cr-border-radius)\(([^;]+)\);
Replace: $1: $2;
Find: <!--#include virtual="\/includes\/(.+).ssi" -->
Replace: {% include '$1.twig' %}
Find: <!--#include (?:virtual|file)="(.+).ssi" -->
Replace: {% include '$1.twig' %}
Find: (?<={% include ')\/?includes\/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*/ | |
Fetch Dreamhost Domain Info | |
The Dreamhost API command domain-list_domains was retired on Nov 2nd 2021. This function is a makeshift replacement for that. | |
Usage: | |
1. Log into your Dreamhost account and click Domains / Manage Domains | |
2. Paste this entire gist into the console | |
3. Press enter and wait for "sites.json" to be downloaded | |
Let me know if this helps anyone else or if you have any suggestions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creator: Phil Cook | |
# Modified: Andy Miller | |
osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) | |
osx_patch_version=${osx_patch_version:-0} | |
osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx_patch_version})) | |
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
# Expect script to supply root/admin password for remote ssh server | |
# and execute command. | |
# This script needs three argument to(s) connect to remote server: | |
# password = Password of remote UNIX server, for root user. | |
# ipaddr = IP Addreess of remote UNIX server, no hostname | |
# scriptname = Path to remote script which will execute on remote server | |
# For example: | |
# ./sshlogin.exp password 192.168.1.11 who | |
# ------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jshint strict:false, undef:false, unused:false | |
/*/ | |
FormCarry Ajax Functions | |
Last Updated 2020-12-04 | |
// How to Initialize | |
ajaxFormInit().then(json => { | |
console.log(json.form); | |
console.log(json.response); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#hey | |
br=$'\n' | |
b=$(tput bold) | |
c=$(tput sgr0) | |
yellow=$(tput setaf 11) | |
ssh_title="$(scutil --get ComputerName) ($(date +'%Y-%m-%d'))" | |
alert () { echo "${b}${yellow}$1${c}"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$home = `printf ~`; | |
putenv("HOME=$home"); | |
putenv('PATH=$PATH:/bin:/usr/bin:/usr/local/bin:$HOME/bin'); | |
function mjml2html($mjml) { | |
$temp = tempnam('', ''); | |
file_put_contents($temp, $mjml); | |
$html = shell_exec('. ~/.bashrc; mjml ' . $temp . ' --config.minify true'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- comment -%} | |
Randomly Shuffle Liquid Array | |
Author: Stephen Ginn at cremadesignstudio.com | |
Credits: Random Number function from @131_studio | |
Usage: {%- include 'random' with 'a,b,c,d,e' -%} | |
This snippet does the following: | |
1. Creates a new array with the provided string | |
2. Calculate X amount to loop, based on array size times 10. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before implementing this, you'll need to contact Shopify support and ask them to turn off Google's ReCaptcha | |
// for your Shopify store's contact forms. Otherwise, it will redirect to the captcha's verification page. | |
// Retrieves input data from a form and returns it as a JSON object: | |
function formToJSON(elements) { | |
return [].reduce.call(elements, function (data, element) { | |
data[element.name] = element.value; | |
return data; | |
}, {}); | |
} |
NewerOlder