Skip to content

Instantly share code, notes, and snippets.

View seanriceaz's full-sized avatar

Sean Rice seanriceaz

View GitHub Profile
@seanriceaz
seanriceaz / sync.js
Created April 10, 2019 23:11
Sync figma layer images up to a firebase bucket
// NOTE: This expects a few things to be stored in a .env file:
// FBKEY=xxxxxxxxx
// FIGMAPERSONALTOKEN=xxxxxxxxxxx
// GOOGLE_APPLICATION_CREDENTIALS=/users/your.name/googlekeys/firebase-storage.json
const axios = require('axios');
const dotenv = require('dotenv');
const Storage = require('@google-cloud/storage');
@seanriceaz
seanriceaz / bash-file-rename
Last active May 19, 2016 21:01
The purpose of this script is to churn through a directory with a bunch of files in it that have been misnamed. It will rename files similar to a find and replace.
#!/bin/bash
# The purpose of this script is to churn through a directory with a bunch of
# files in it that have been misnamed. It will rename files similar to a find
# and replace.
#Find this string
FINDTHIS="--"
#Replace it with this string
REPLACEWITH="-"
@seanriceaz
seanriceaz / PS-files-to-thumbs-png.jsx
Last active May 18, 2016 17:31
This script cycles through files in a directory (hard coded) and converts them to thumbnail png's.
#target photoshop
// This script cycles through files in a directory (hard coded) and converts them to thumbnail png's.
// Only currently works on portrait orientation images.
app.bringToFront();
app.preferences.rulerUnits = Units.PIXELS;
// A hard coded path to a directory 'pc style'
var folderToProcess = 'h:\\source\\file';
var processFolder = Folder(folderToProcess);
@seanriceaz
seanriceaz / PS-SavePairsOfLayers.jsx
Last active October 3, 2016 18:08
This script will loop through layers in the first two layer groups in a photoshop file toggling them one by one and exporting a png of each flattened combination
// This script will loop through layers in the first two layer groups
// in a photoshop file toggling them one by one and exporting a png of
// each flattened combination
// NOTE: Start the file with all the grouped layers set invisible,
// but the groups themselves visible, and any non-grouped layets you want
// to put in all the files visible.
#target photoshop
@seanriceaz
seanriceaz / StickyTableHeaders_1.html
Last active December 23, 2015 17:59
My team at U-Haul had a challenge time on Friday to come up with a way to do sticky table headers on scrollable tables in the most semantic way possible without removing the connection that the TH elements had with the table (to save accessibility). Many members of the team had great and simple javascript based solutions. Mine was pure css and H…
<!DOCTYPE HTML>
<html>
<head>
<!-- meta -->
<title>Scrolling table - CSS only sticky headers - example</title>
<style type="text/css">
/* Probably some standard styles */
*, *:before, *:after{