Skip to content

Instantly share code, notes, and snippets.

View snide's full-sized avatar
🐢
Steady, constant work always wins.

Dave Snider snide

🐢
Steady, constant work always wins.
View GitHub Profile
import { allBlogs, allDocs } from '~/.contentlayer/generated';
import { DocHeading } from '~/contentlayer.config';
import { Blog as XataBlog, Docs as XataDoc, getXataClient } from '~/utils/xata';
const xata = getXataClient();
export const getGitSha = () =>
process.env.NODE_ENV === 'development' ? 'development' : process.env.VERCEL_GIT_COMMIT_SHA;
export const blogSync = async () => {
set nocompatible
filetype off
set shell=fish
set noerrorbells " No beeps
set confirm " Ask to save changed buffers
set number " Show line numbers
set backspace=indent,eol,start " Makes backspace key more powerful.
set showcmd " Show me what I'm typing
set showmode " Show current mode.
set noswapfile " Don't use swapfile
# Source: https://github.com/vrde/i3-quiet/blob/master/quiet-cmd.py
#!/usr/bin/env python3
import argparse
import sys
import json
from subprocess import run, check_output
import os
ZEN_NUMBER = 99
@snide
snide / math.scss
Last active January 12, 2020 23:11
// The luminance function requires some math functions be added to sass as shown below
@function luminance($color) {
// Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
$rgba: red($color), green($color), blue($color);
$rgba2: ();
@for $i from 1 through 3 {
$rgb: nth($rgba, $i);
$rgb: $rgb / 255;
@context.router.transitionTo('promote-email-template', {name: @props.guide.get('name')}, {shortName: @props.guide.get('shortName')}, {redeem: @props.guide.get('redeemCode')})
@state.lineData:
series: [[1,2,3]]
labels: [date,date,date]
# Controls the survey details view
DateFormat = require 'components/ui/date-format'
LineChart = require 'components/chartist/line-chart'
PieChartWithTable = require 'components/metrics/widget-pie-chart-with-table'
BarChartWithTable = require 'components/metrics/widget-bar-chart-with-table'
LineChartPreview = require 'components/metrics/widget-line-chart-preview'
SelectedChart = require 'components/metrics/metrics-selected-chart'
Moment = require 'moment'
randDates = []
for (newDate = Moment(); newDate < Moment(newDate).add(10, 'd'); newDate = Moment(newDate).add(1, 'd'))
randDates.push(newDate)
{# base.html #}
<body style="{% block color %}#000{% endblock %};">
{# articles/individual.html #}
{% extends "templates/partials/base.html" %}
{% block color %}
{% for asset in cms.assets %}
{{ asset.name }}
<img src="{{ asset.image|imageSize(400) }}" />
{% endofor %}