Skip to content

Instantly share code, notes, and snippets.

View danielgolden's full-sized avatar

Daniel Golden danielgolden

View GitHub Profile
@danielgolden
danielgolden / daily-log-links.js
Last active December 22, 2023 18:40
Generate daily log links from a PR
import "./custom-spring.css";
// import { Pane } from "tweakpane";
const box = document.querySelector(".box");
interface SpringOptions {
stiffness: number;
mass: number;
damping: number;
end: number;
@danielgolden
danielgolden / getColorFillStyles.js
Last active February 25, 2022 12:34
Get color fill styles from a Figma documnet
// Outputs json that includes your styles, their names, colors, etc.
// It's shaped like this:
//
// [
// {
// "name": "Danger",
// "key": "cab6ae8c5b6634d6exampleKey151b4ee724",
// "description": "",
// "color": {
// "type": "SOLID",
@danielgolden
danielgolden / figmaOneCoreColorStats.js
Last active January 8, 2022 20:09
Get stats on the One Core Color style adoption level of a given file in Figma
const oneCorePaintStyles = [
{
"name": "Roles/Interactive/Interactive Primary",
"key": "18ecca921484122521d9d31c21d32217b76a8214",
"description": "",
"color": {
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
@danielgolden
danielgolden / standard-nerdpack-layout.css
Last active November 22, 2019 21:26
Some helpers for a standard nerdpack layout
.toolbar-container {
height: 66px;
box-sizing: border-box;
border-top: 1px solid #edeeee;
border-bottom: 1px solid #edeeee;
padding: 0 16px;
background-color: #fff;
}
.toolbar-section1 .toolbar-item:first-child {
@danielgolden
danielgolden / nerdpack-standard-layout.js
Created November 22, 2019 21:09
A standard layout for nerdpacks
import React from "react";
import {
Grid,
GridItem,
Stack,
StackItem,
Dropdown,
DropdownItem,
TextField,
Button,
@danielgolden
danielgolden / reset-password-email.html
Created August 9, 2018 18:03
Epiphany - Reset Password Email
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8"> <!-- utf-8 works for most cases -->
<meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
<meta name="x-apple-disable-message-reformatting"> <!-- Disable auto-scale in iOS 10 Mail entirely -->
<title>Epiphany - Reset Your Password</title> <!-- The title tag shows in email notifications, like Android 4.4. -->
<!-- Web Font / @font-face : BEGIN -->
@danielgolden
danielgolden / welcome-email.html
Last active August 9, 2018 18:02
Epiphany - Welcome Email
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8"> <!-- utf-8 works for most cases -->
<meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
<meta name="x-apple-disable-message-reformatting"> <!-- Disable auto-scale in iOS 10 Mail entirely -->
<title>Epiphany - Welcome!</title> <!-- The title tag shows in email notifications, like Android 4.4. -->
<!-- Web Font / @font-face : BEGIN -->
@danielgolden
danielgolden / CUREMoms Aside Photo.html
Created June 12, 2013 20:04
Code for text section of blog posts in Wordpress for cure.org. Code extracted and reformatted so that posters to the blog can add images themseleves by replacing the alt and src attributes.
<aside class="featured_aside">
[caption id="attachment_80262" align="alignleft" width="175"]
<img class="wp-image-80262 featured_aside_img" alt="SHORT IMAGE DESCRIPTION HERE" src="LINK TO IMAGE HERE" width="175" />
<br /><br />
<p class="featured_aside_caption">Caroline's joy is evident as she comforts Johanser after surgery.</p>
[/caption]
</aside>
@danielgolden
danielgolden / placefill.js
Last active December 17, 2015 20:59
A polyfill for the input placeholder attribute.
/**
* placefill.js - A polyfill for the placeholder attribute.
* @author Daniel Golden <danielgolden90@gmail.com>
*/
var $place_holder_inputs = $('input[placeholder]');
var place_holder_text = $('input').attr('placeholder');
// make value attribute of all inputs with placeholder attribute equal to
// value of placeholder attribute