Skip to content

Instantly share code, notes, and snippets.

View budparr's full-sized avatar
🎯
Focusing

Bud Parr budparr

🎯
Focusing
View GitHub Profile
@eddiewebb
eddiewebb / readme.md
Last active February 12, 2024 08:46
Hugo JS Searching with Fuse.js
#!/bin/sh
# default commands for osx to make it nicer to work with
##########################
# General UI?UX settings #
##########################
# Set hostname (hex of MVB9APPS)
sudo scutil --set ComputerName "0x4d56423941505053"
sudo scutil --set HostName "0x4d56423941505053"
@jdorfman
jdorfman / the-markers.md
Last active June 11, 2020 16:59
The markers that show that the future of Open Source might not be as good as it is today.
@andrewdelprete
andrewdelprete / webpack.config.js
Last active April 12, 2023 01:55
Webpack: Tailwind CSS + PurgeCSS Example
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const path = require("path");
const glob = require("glob-all");
const PurgecssPlugin = require("purgecss-webpack-plugin");
/**
* Custom PurgeCSS Extractor
* https://github.com/FullHuman/purgecss
* https://github.com/FullHuman/purgecss-webpack-plugin
*/
@dillansimmons
dillansimmons / smoothScroll.JS
Created October 30, 2017 21:59
Smooth scroll anchor links
// Standard Smooth scroll JS - I know kinda verbose D.S.
(function() {
'use strict';
// Feature Test
if ('querySelector' in document && 'addEventListener' in window && Array.prototype.forEach) {
// Function to animate the scroll
var smoothScroll = function(anchor, duration) {
// Calculate how far and how fast to scroll
var startLocation = window.pageYOffset;
var endLocation = anchor.offsetTop;
@RickCogley
RickCogley / ! Readme.md
Last active January 29, 2022 02:08
zsh functions for hugo static site generator

I use a Mac with hugo, and have some zsh functions in my .zshrc file, to make my life easier.

I have a bunch of functions for running hugo server with different ports to keep the sites out of each other's hair. Then I have some functions for generating the sites and pushing to production.

Once you have the functions written up, you can just execute hugoserver-1 to start the local server on port 1377, in the case below, and ctrl-c to stop it. And hugodeploy-1 to generate and push to your web server via rsync.

The sample below is to make it easy to understand the gist (get it?). The ugly truth is here:

https://github.com/RickCogley/dotfiles/blob/master/zsh/zshrc

1. Highlight a recommended option,

2. Allow users to switch currency (€/$/£)

3. Allow users to switch pricing monthly/yearly

4. Keep the entire pricing plan area clickable

5. Use slider to calculate how much a user would save

6. Provide free first month for good engagement

7. Prominently highlight testimonials prominently

8. Repeating call to action on top and bottom

9. Sell benefits instead of features

10. Indicate that users can cancel any time

@dbox
dbox / breakpoints.css
Last active January 24, 2017 04:22
breakpoints.css (cssnext)
/* breakpoints */
:root { /* px size at 16px base font size */
@custom-media --xs (width < 20em); /* 320px */
@custom-media --s (width < 28em); /* 448px */
@custom-media --m (width < 48em); /* 768px */
@custom-media --l (width < 64em); /* 1024px */
@custom-media --xl (width < 80em);
@ohiosveryown
ohiosveryown / change-class-on-scroll.html
Last active March 1, 2024 11:02
Vanilla JS – change/add class based on scroll position.
// https://codepen.io/cmykw/pen/gemxJm
// layout
<nav/>
// style
<style>
body { min-height: 200vh; }
nav {