Skip to content

Instantly share code, notes, and snippets.

View harnerdesigns's full-sized avatar
😎
Stuck in Vim

Jack Harner harnerdesigns

😎
Stuck in Vim
View GitHub Profile
/*
Install theme using the Stylus extension for your web browser.
*/
.roam-block-container {
max-width: 850px;
}
.roam-block {
@harnerdesigns
harnerdesigns / stencil-push.yml
Last active April 6, 2022 22:20
Push a BigCommerce Stencil theme with GitHub Actions. See https://jackharner.com/blog/bigcommerce-stencil-ci-cd-with-github-actions/ for details.
name: Push Stencil Theme To BigCommerce
# This workflow is triggered on pushes to the Master Branch only.
on:
push:
branches:
- master
jobs:
build:
name: Stencil Push
@harnerdesigns
harnerdesigns / set_codes.py
Created January 15, 2020 17:26
A python script that runs through a CSV file of coupon code IDs to set "Exclude This Coupon From Cart-Level Discounts" on the BigCommerce Backend
import time
import os
import csv
#### Selenium to run Headless Chrome ####
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
@harnerdesigns
harnerdesigns / _cardShadow.scss
Created July 23, 2019 02:07
Jack Harner's Box Shadow SCSS Mixin
/// Computes a top-shadow for a card effect.
/// @param {Number} $depth - depth level
/// @return {List}
@function top-shadow($depth) {
$primary-offset: nth(1 3 10 14 19, $depth) * 1px;
$blur: nth(2 3 10 14 19, $depth) * 4px;
$color: rgba(black, nth(0.12 0.16 0.19 0.25 0.3, $depth));
@return 0 $primary-offset $blur $color;
}
@harnerdesigns
harnerdesigns / breakpoints.scss
Created April 24, 2019 15:40
SASS Breakpoints Mixin
// Usage:
// @include breakpoint(desktop){ ... }
//
@mixin breakpoint($point) {
@if $point==desktop {
@media (min-width: 70em) {
@content ;
}
}
@harnerdesigns
harnerdesigns / css.scss
Last active June 20, 2018 21:56
Snippets From Font Awesome 5 in Psuedo Elements Blog
a[href*='tel']{
display: block;
color: #fff;
text-decoration: none;
&:before{
display: none;
font-family: "Font Awesome 5 Solid";
content: "\f095";
}
@harnerdesigns
harnerdesigns / Upload.ps1
Last active May 20, 2020 16:22
A PowerShell script to upload via FTP a directory one file at a time. I basically got tired of having to open FileZilla and wait for it to connect and then waiting for everything to upload.
#Directory To Pull Files From
$Dir="C:\foo\bar\toBeUploaded"
#FTP site and credentials
$ftp = "ftp://ftp.somesite.com/"
$user = "user"
$pass = "pass"
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass)