Skip to content

Instantly share code, notes, and snippets.

View rdegges's full-sized avatar

Randall Degges rdegges

View GitHub Profile
#!/usr/bin/python
"""
advanced-flood.py
@author: Randall Degges
@email: rdegges@gmail.com
@date: 11-20-09
This program floods the specified phone number and spoofs caller ID making it
@rdegges
rdegges / tmux.conf
Created September 3, 2014 16:41
tmux.conf
##### CLEANUP
# Unbind the default tmux command prefix, CTRL+b.
unbind C-b
#####
##### PREFERENCES
# Use CTRL+a as our tmux command prefix.
set -g prefix C-a
@rdegges
rdegges / abstract.md
Created June 1, 2017 06:25
Talk Abstract

JWTs Aren't So great

JSON Web Tokens (JWTs) are all the rage in the security world. They’re becoming more and more ubiquitous in web authentication libraries, and are commonly used to store a user’s identity information.

In this talk, Randall Degges, Developer Advocate at Okta, will walk you through web authentication from the ground up, explaining how it works both with and without JWTs. Along the way you’ll learn why JWTs aren’t as great as you might hear, and learn about better ways to speed up web authentication for your websites.

Through this talk, you’ll learn:

  • How web authentication works.
  • How HTTP sessions and cookies store information.
@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
@rdegges
rdegges / auto_connect_wifi.sh
Created July 31, 2011 06:08
holiday inn express wifi hack
curl -X POST --data "FNAME=0&IP=192.168.100.159&username=holiday&password=july" http://login.nomadix.com:1111/usg/process
@rdegges
rdegges / proxy_nginx.sh
Created April 11, 2011 05:30
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
@rdegges
rdegges / hello-world-vue.js
Created July 20, 2017 20:36
A simple hello world example in Vue.js.
<html>
<body>
<div id="app">
<h1>{{ message }}</h1>
</div>
<script src="https://unpkg.com/vue"></script>
<script>
let app = new Vue({
el: "#app",
@rdegges
rdegges / Procfile
Created December 18, 2011 04:33
Heroku Procfile
web: python project/manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3
--max-requests 1000 --log-level info --settings=settings.prod
scheduler: python project/manage.py celeryd -B -E --maxtasksperchild=1000
--settings=settings.prod
worker: python project/manage.py celeryd -E --maxtasksperchild=1000
--settings=settings.prod