Skip to content

Instantly share code, notes, and snippets.

View ajmalafif's full-sized avatar
💻

Ajmal Afif ajmalafif

💻
View GitHub Profile
# Admin API key goes here
KEY="[FIND ME IN THE ADMIN SETTINGS]"
# Split the key into ID and SECRET
TMPIFS=$IFS
IFS=':' read ID SECRET <<< "$KEY"
IFS=$TMPIFS
# Prepare header and payload
NOW=$(date +'%s')
@ajmalafif
ajmalafif / base.css
Last active August 27, 2023 07:53
Overwrite Shopify‘s Dawn border & box shadow‘s input field (Newsletter box)
.field:before, .customer .field:before,.field:after, .customer .field:after {
display: none !important;
}
.customer .field input, .customer select, .field__input, .select__select {
box-shadow: -1px 0px 0px 1px #C0C0C0 !important;
border: 1px solid #000;
}
@ajmalafif
ajmalafif / screenshot-resize-border.json
Last active July 3, 2023 08:36
Automator.design -> Screenshot -> Resize & Bordered
{
"id": "lhn1hp8aqiulsb1pji",
"name": "Screenshot -> Resize & Bordered",
"description": "",
"color": "green",
"actions": [
{
"id": "ljmha6c33u1ov3tam9o",
"command": {
"name": "getCurrentSelection",
@ajmalafif
ajmalafif / source-code.md
Last active December 2, 2022 02:57
[checklist] — project checklist
@ajmalafif
ajmalafif / tokens.json
Last active February 7, 2022 16:33
Figma Tokens for Tailwind v3.0.18 by Luis Falcon
{
"black": {
"value": "#000000",
"type": "color"
},
"white": {
"value": "#ffffff",
"type": "color"
},
"slate": {
@ajmalafif
ajmalafif / aws.md
Last active December 27, 2021 15:24
[aws] - AWS Powered WordPress (Bedrock)
@ajmalafif
ajmalafif / videoEmbed.js
Created November 17, 2021 15:06 — forked from bzerangue/videoEmbed.js
videoEmbed.js contentType - preview component for Sanity.io CMS richText PortableText editor - based off of Knut's YouTube Preview, https://www.youtube.com/watch?v=kLsER_zHiS4
import React from 'react'
const VideoEmbedPreview = ({ value }) => {
const url = value.url
const responsiveVideoContainer = {
padding: "56.25% 0 0 0",
position: "relative"
}
@ajmalafif
ajmalafif / gatsby-node.js
Last active October 16, 2021 09:46
Related Reviews/Posts with Sanity.io and GatsbyJS 3.0
//Hook into the createSchemaCustomization API
//This hook runs after all our nodes have been created
exports.createSchemaCustomization = ({ actions, schema }) => {
//The createTypes action allows us to create custom types
//and modify existing ones
const { createTypes } = actions
// Create our schema customizations
const typeDefs = [
// Replace "SanityReview" with your _typename of your post type