Skip to content

Instantly share code, notes, and snippets.

View chrisvogt's full-sized avatar
🌸
✿◕‿◕

Chris Vogt chrisvogt

🌸
✿◕‿◕
View GitHub Profile
@chrisvogt
chrisvogt / common-markdown-templates.md
Last active March 5, 2020 17:18
Common Markdown templates that I use.

❯ Two Column Table

Format Demonstration
JPG Image: JPG
PNG Image: PNG
SVG Image: SVG

❯ Before & After Comparison w/Images

@chrisvogt
chrisvogt / parse-fec-presidential-candidates.js
Last active December 10, 2019 08:45
Small utility script to convert lists of presidential candidates – found on the fec.gov website – from CSV to JSON.
// NOTE(cvogt): parses documents from the FEC registered candidates table
// located at https://www.fec.gov/data/candidates/?election_year=2020&office=P
const csvToJson = require('csvtojson/v2');
const candidatesFile = './candidates-running-2016-2019-12-09T23_23_05.csv';
const bracketsStringToArray = str => {
// HACK(cvogt): this can be optimized, and is fragile – throws upon {00,00}
const itemJsonString = str.replace('{', '[').replace('}', ']');
const items = JSON.parse(itemJsonString);
@chrisvogt
chrisvogt / get-recent-prs.graphql
Last active August 28, 2019 04:45
Fetch the last n pull requests for a user from the GitHub GraphQL API.
query {
user(login: "${username}") {
pullRequests(
last: ${maxRepos},
orderBy: {
direction: ASC,
field: CREATED_AT
}
) {
nodes {
@chrisvogt
chrisvogt / goodreads-status-updates.md
Last active June 13, 2019 08:45
These are my notes for a project to render book-reading status updates on my personal website.
<?xml version="1.0" encoding="UTF-8"?>
<GoodreadsResponse>
<Request>
<authentication>true</authentication>
<key><![CDATA[iP2G9OyqjQGvBv4xAzn2DQ]]></key>
<method><![CDATA[review_list]]></method>
</Request>
<books start="1" end="20" total="116" numpages="6" currentpage="1">
<book>
@chrisvogt
chrisvogt / social-scripts.js
Last active October 20, 2018 18:19
Useful scripts for managing and controlling social profiles.
// NOTE(cvogt): LinkedIn doesn't provide a bulk unfollow option. To bulk unfollow, go to the /feed/following
// route, scroll down to the end so that all followers are visible, select all of the unfollow buttons
// and trigger their click event.
const unfollowButtons = document.querySelectorAll('button.feed-following__follow-btn');
unfollowButtons.forEach(button => {
button.click();
});
console.info(`Unfollowed ${unfollowButtons.length} profiles.`);
// NOTE(cvogt): Remove all interests associated with your Facebook ads profile. To remove, go to the
@chrisvogt
chrisvogt / ecosystem.config.js
Created August 25, 2018 20:33
PM2 ecosystem file for js-personal-api
module.exports = {
apps: [{
name: 'js-personal-api',
script: 'npm',
args: 'start',
env: {
NODE_ENV: 'dev',
},
env_production: {
NODE_ENV: 'production',
{
"link": "https://www.history.com/topics/holidays/july-4th",
"message": "",
"items": [
{
"link": "https://www.history.com/topics/holidays/july-4th",
"image": "https://onlinestore.wsimg.com/id4/id4-free.png"
},
{
"link": "https://www.history.com/topics/holidays/july-4th",
diff --git a/_posts/2018-06-19-jenkins-build-monitoring-plugin.md b/_posts/2018-06-19-jenkins-build-monitoring-plugin.md
index 051b270..8031164 100644
--- a/_posts/2018-06-19-jenkins-build-monitoring-plugin.md
+++ b/_posts/2018-06-19-jenkins-build-monitoring-plugin.md
@@ -1,11 +1,9 @@
---
layout: post
-title: "A build monitoring plugin for Jenkins "
+title: "A build monitoring plugin for Jenkins"
date: 2018-06-19 08:53:01 -0800
This is the test content gist for my website's body.