This file contains hidden or 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 | |
# Simple Alert Function | |
alert () { | |
tput bold; tput setaf 11; echo "$1"; tput sgr0; | |
} | |
# ============================================================================== | |
# START SETUP |
This file contains hidden or 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
/* pickadate v5.0.0-alpha.2, @license MIT */ | |
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | |
typeof define === 'function' && define.amd ? define(factory) : | |
(global = global || self, global.pickadate = factory()); | |
}(this, function () { 'use strict'; | |
function styleInject(css, ref) { | |
if ( ref === void 0 ) ref = {}; | |
var insertAt = ref.insertAt; |
This file contains hidden or 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
/* pickadate v5.0.0-alpha.2, @license MIT */ | |
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | |
typeof define === 'function' && define.amd ? define(factory) : | |
(global = global || self, global.pickadate = factory()); | |
}(this, function () { 'use strict'; | |
function _defineProperty(obj, key, value) { | |
if (key in obj) { | |
Object.defineProperty(obj, key, { |
This file contains hidden or 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
# SHOPIFY THEME EXPORTER | |
# This script downloads docs / code for ALL Shopify themes for further analysis. | |
# For example, you can search the downloaded code for framework-specific classes | |
# like "col-md-", "btn-outline", etc. | |
# NOTE: Use with caution or you'll be rate limited! Latest version not tested. | |
baseUrl="https://themes.shopify.com" | |
destPath="$HOME/desktop/themes-shopify" |
This file contains hidden or 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; | |
}, {}); | |
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
# ------------------------------------------------------------------------ |
OlderNewer