Skip to content

Instantly share code, notes, and snippets.

View huffmanks's full-sized avatar
🐇

Kevin Huffman huffmanks

🐇
View GitHub Profile
function parseRSS(xmlString) {
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlString, "application/xml");
const channel = xmlDoc.querySelector("channel");
const items = channel?.querySelectorAll("item");
if (!items) return;
const rssArr = [];
# ~/.gitconfig

[init]
	defaultBranch = main
[user]
	name =
	email =
[core]
	excludesfile = ~/.gitignore
@huffmanks
huffmanks / getFileSafeDateString.js
Created November 1, 2023 18:36
Returns a date time string that is safe to use for filenames.
/*
@title File Safe Date String
@desc Returns a date time string that is safe to use for filenames
@output 2023-11-01_14-30-39
*/
const getFileSafeDateString = () => {
const event = new Date()
const time = event.toLocaleTimeString('it-IT')
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Slider Demo</title>
<style>
* {
margin: 0;
@huffmanks
huffmanks / custom-scrollbar.css
Created August 21, 2022 01:56
Custom scrollbar CSS
/*
* @title Custom scrollbar
* @note For vertical switch overflow-x and scroll-snap-type to 'y'.
* @html <div class='scrollbar-horizontal'>
* <div class='child'>...</div>
* </div>
*/
.scrollbar-horizontal {
overflow-x: auto;
<!--
* @title Video background blur
* @desc Shows a background of the video on the sides if screen is larger than 1200px
-->
<!-- CSS -->
<style>
.video-container {
display: flex;
justify-content: center;

Reset local and pull

git reset --hard && git pull

OR

git stash && git pull && git stash pop

Upgrading Node env for MacOS

Setup npm permissions

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Check global packages

  • npm list -g --depth 0
<!--
* @title Filter times
* @desc Shows times available based on date
-->
<div>
<label for="interviewDate">Interview Dates/Times</label>
<select name="interviewDate" id="interviewDate" tabindex="-1">
<option value="" disabled="disabled" selected="selected">Select One</option>
<option value="Thursday, March 17">Thursday, March 17</option>