Skip to content

Instantly share code, notes, and snippets.

View ardeay's full-sized avatar
🍊

Randy Apuzzo ardeay

🍊
View GitHub Profile
@ardeay
ardeay / font-awesome.less
Created January 14, 2016 21:58
Font Awesome with CDN for inline
@font-face {
font-family: 'FontAwesome';
src: url('//netdna.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.eot?v=4.5.0');
src: url('//netdna.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('//netdna.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('//netdna.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('//netdna.bootstrapcdn.com/font-awesome/4.5.0/fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-al
@ardeay
ardeay / parsley.js
Last active July 8, 2022 19:49
Parsley toJSON Output Example
(** logic to setup param using url query parameters **)
{{$limit = 5}}
{{$page = 0}}
{{if {get_var.page} }}
{{$page = {get_var.page} }}
{{end-if}}
{{if {get_var.limit} }}
{{$limit = {get_var.limit} }}
{{end-if}}
(** code to loop through a content model and make a json ouput **)
@ardeay
ardeay / ahs_zesty_redirect.js
Created July 8, 2022 19:23
Redirect Example for AHS
// fetchRedirects, get the list of all redirects set in the content manager, loads into next.config.js
async function fetchZestyRedirects() {
// access the headless url map
let redirectsAPIURL = 'https://ahscom.zesty.dev/-/headless/redirects.json';
try {
const req = await fetch(redirectsAPIURL);
let redirects = await req.json();
let redirectsForNext = []
redirects.forEach(r => {
@ardeay
ardeay / zoho.html
Created June 30, 2022 21:22
zoho form
<!-- Note :
- You can modify the font style and form style to suit your website.
- Code lines with comments Do not remove this code are required for the form to work properly, make sure that you do not remove these lines of code.
- The Mandatory check script can modified as to suit your business needs.
- It is important that you test the modified form before going live.-->
<div id='crmWebToEntityForm' class='zcwf_lblLeft crmWebToEntityForm' style='background-color: white;color: black;max-width: 600px;'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<META HTTP-EQUIV ='content-type' CONTENT='text/html;charset=UTF-8'>
<form action='https://crm.zoho.com/crm/WebToLeadForm' name=WebToLeads4863239000000576019 method='POST' onSubmit='javascript:document.charset="UTF-8"; return checkMandatory4863239000000576019()' accept-charset='UTF-8'>
<input type='text' style='display:none;' name='xnQsjsdp' value='5ee1dee6d6364d8d7fad94f4555993b5a97c604f78afe42210a7390b99f48dd4'></input
@ardeay
ardeay / index.js
Created June 3, 2022 15:29 — forked from weienwong/index.js
Webhook creation and test script
require('dotenv').config()
const request = require('request')
// webhooks instances-api
function scheduleItemPublishWebhook () {
// create webhook
const createItemPublishWebhookOption = {
method: 'POST',
url: `${process.env.ACCOUNTS_API_HOST}/v1/webhooks`,
headers: {
@ardeay
ardeay / index.js
Created May 25, 2022 14:20
Recursion Example with Node
console.log('Simple Recursion Example')
function recurse(num){
let newnum = num + 1
if(num < 50){
recurse(newnum)
}
console.log(newnum)
}
@ardeay
ardeay / test.html
Last active August 13, 2021 17:10
Text External Parsley
<h1>Hello from the outside</h1>
<p>The Server Time is {{site.date(r)}}</p>
<h2>YourTitle: {{this.title}}</h2>
@ardeay
ardeay / zesty-ext.json
Last active August 9, 2021 20:44
Zesty Extension JSON
{
"name": "bootstrap",
"content": "asdfasf.yaml",
"web": {
"stylesheets": "styles.yaml",
"scripts": "asdfasd.yaml",
"views": "asdfasdf.yaml"
},
"env": {
"settings": "/yaml-files/settings.yaml"
@ardeay
ardeay / hello.js
Created July 22, 2021 00:20
helloworld
// hello
@ardeay
ardeay / docs.js
Last active July 15, 2021 16:41
Design System Docs Example
// basic fires upa search
<Docs subject="content models"/>
// with url override
<Docs subject="ZUID Specificaion" url="https://zesty-io.github.io/zuid-specification/" />