This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { parse } = require('rss-to-json'); | |
const cheerio = require('cheerio'); | |
const fs = require('fs'); | |
const TurndownService = require('turndown') | |
const turndownService = new TurndownService({ | |
codeBlockStyle: 'fenced', | |
bulletListMarker: '-', | |
headingStyle: 'atx', | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.git_templates/hooks/pre-push | |
#!/bin/bash | |
protected_branch='master' | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ $protected_branch = $current_branch ] | |
then | |
echo "${protected_branch} is a protected branch, create PR to merge" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @see https://www.nodc.noaa.gov/archive/arc0021/0002199/1.1/data/0-data/HTML/WMO-CODE/WMO4677.HTM | |
function matchWeatherCode(code) { | |
switch (code) { | |
case 0: | |
return "🌥️" | |
case 1: | |
return "🌥️" | |
case 2: | |
return "🌥️" | |
case 3: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# Must use Powerline font, for \uE0A0 to render. | |
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}\uE0A0 " | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg_bold[red]%}‹" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function getStuff(token) { | |
const body = {} | |
// wrap in try / catch so we can resolve any network failures | |
try { | |
// initial request | |
const result = await fetch(`https://example.com/api/v1`, { | |
headers: { | |
"x-CSRF-Token": token, | |
"Content-Type": "application/json" | |
}, |
OlderNewer