Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rdegges's full-sized avatar

Randall Degges rdegges

View GitHub Profile
@rdegges
rdegges / trans-to-blog.py
Created May 22, 2023 05:24
Simple script to convert a podcast transcript into a blog post.
"""
trans-to-blog.py
~~~~~~~~~~~~~~~~
A simple script that, given a podcast transcript file (in any format), will use OpenAI
to parse the transcript and create a blog post in Markdown format based on the
contents of the transcript.
Requirements
~~~~~~~~~~~~
@rdegges
rdegges / strip-video-metadata.sh
Created December 10, 2022 08:42
Given a directory full of video files, strip all metadata from the videos using ffmpeg.
#!/usr/bin/bash
#
# This script will remove the metata from all video files in the given
# directory.
#
# @requires ffmpeg
# @usage ./strip-video-metadata.sh </path/to/folder>
# Loop through all files in the directory
for f in "$1"/*
@rdegges
rdegges / clean.py
Last active October 10, 2021 05:22
Small Python hack to purge Google Contacts of any contacts without a phone number.
# for context: https://twitter.com/rdegges/status/1447066985213292544?s=20
import csv
ORIG_FILE = 'contacts.csv'
NEW_FILE = 'contacts-clean.csv'
PHONE_NUMBER_INDEX = 41
{
ip: '8.8.8.8',
location: {
country: 'US',
region: 'California',
city: 'Mountain View',
lat: 37.40599,
lng: -122.078514,
postalCode: '94043',
timezone: '-07:00',
@rdegges
rdegges / okta-server.js
Created August 21, 2019 21:09
Showcase an Okta Node Server #okta #javascript
const express = require("express");
const okta = require("okta");
const app = express();
app.use(okta());
@rdegges
rdegges / test.js
Created May 20, 2019 21:46
This example shows you how to do X #okta #mfa
import "hi";
test.call();
@rdegges
rdegges / list-users.js
Created April 17, 2019 23:25
List Users in Okta Using Node #okta #mfa
client.listUsers(u => {
console.log(user);
});
@rdegges
rdegges / halloween.sh
Created October 20, 2017 18:13
Spooky Halloween Prompt
export PS1='
👻 %{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(ruby_prompt_info " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} '
@rdegges
rdegges / sample-output.json
Created October 16, 2017 02:31
Sample Output
{
"catchAll": "false",
"disposable": "false",
"dns": "OK",
"emailAddress": "r@rdegges.com",
"free": "false",
"mxs": [ "mail.protonmail.ch" ],
"smtp": "OK",
"validFormat": "OK"
}
@rdegges
rdegges / index.html
Created July 21, 2017 01:34
Crypto Compare styling.
<tbody>
<tr v-for="coin in coins">
<td>{{ coin.rank }}</td>
<td><img v-bind:src="getCoinImage(coin.symbol)"> {{ coin.name }}</td>
<td>{{ coin.symbol }}</td>
<td>{{ coin.price_usd | currency }}</td>
<td v-bind:style="getColor(coin.percent_change_1h)">
<span v-if="coin.percent_change_1h > 0">+</span>{{ coin.percent_change_1h }}%
</td>
<td v-bind:style="getColor(coin.percent_change_24h)">