Skip to content

Instantly share code, notes, and snippets.

@iamskok
iamskok / SassMeister-input.scss
Created October 14, 2015 00:03
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$buttons: (
'error': (#d82d2d, #666),
'success': (#52bf4a, #fff),
'warning': (#c23435, #fff)
);
@iamskok
iamskok / .aliases
Created December 20, 2015 03:30
oh my zsh git aliases
amend='git commit --amend'
g=git
ga='git add'
gaa='git add --all'
gac='git add . && git commit -v'
gapa='git add --patch'
gb='git branch'
gba='git branch -a'
gbda='git branch --merged | command grep -vE "^(\*|\s*master\s*$)" | command xargs -n 1 git branch -d'
gbl='git blame -b -w'
@iamskok
iamskok / randomHex.js
Created June 20, 2019 05:03
Random HEX color generator
function randomHex() {
const hexMax = 256 * 256 * 256;
return '#' + Math.floor(Math.random() * hexMax).toString(16).toUpperCase().padStart(6, '0');
}
# DEV Sandbox
## Objective
Learn Shopify and practice JavaScript by following BVA styleguide.
Some designs might be simplified along the way.
## Links
### Git
@iamskok
iamskok / cloudSettings
Last active July 1, 2020 19:29
Visual Studio Code Settings
{"lastUpload":"2020-07-01T19:29:19.444Z","extensionVersion":"v3.4.3"}
@iamskok
iamskok / README.md
Created September 24, 2019 17:31
CSS in JS Resources
/** @jsx jsx */
import { jsx } from 'theme-ui'
import { useEffect, useState } from 'react'
import Image from 'gatsby-image'
import { getFluidImageObject } from 'gatsby-transformer-cloudinary'
export default () => {
const [fluid, setFluid] = useState(false)
useEffect(() => {
@iamskok
iamskok / shopify-theme-certification-notes.md
Last active May 18, 2024 15:37
Notes on Shopify "Theme Development Certification"

Shopify Certification

  • aria-live="polite" is used for content which might get updated. Polite won't interupt.
  • a11y.js comes with Slate. Has trapFocus and removeTrapFocus methods.
  • URL mapping
  • The {{ content_for_header }} variable must be placed between the opening and closing <head> tag. It inserts the necessary Shopify scripts into the <head> which includes scripts for Google Analytics, Shopify analytics, for Shopify apps, and more.
  • The {{ content_for_layout }} variable must be placed between the opening and closing <body> tag. It outputs dynamic content generated by all of the other templates (index.liquid, product.liquid, and so on).
  • t filter is used to pull translation from locales/ru.json
  • In tags with more than one and or or operator, operators are checked in order from right to left. You cannot change the order of operations using parentheses — parentheses are invalid characters in Liquid and will preven
@iamskok
iamskok / gist:3a8bb96c5b2cfd0906e9f7922127c36a
Created December 8, 2019 21:01
Kill Node process on a specific port
lsof -nP -i4TCP:9000 | grep LISTEN
kill PID
@iamskok
iamskok / Gatsby-bootstrap-lifecycle.md
Created January 9, 2020 07:10 — forked from swyxio/Gatsby-bootstrap-lifecycle.md
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9