Skip to content

Instantly share code, notes, and snippets.

@Chealion
Chealion / overcastXMLExtract.py
Created January 8, 2023 06:09
Grabbing your starred episodes from the Overcast OPML data export
#! /bin/env/python
import xml.etree.ElementTree as ET
from datetime import datetime
import urllib.parse
import webbrowser
# Strongly recommend you run `grep userRecommendedDate overcast.opml | wc -l` to know how many entries you are about to make...
APP="/Applications/Managed Software Center.app.app"
# Version should be of the format x.x.x.x. ex: 10 or 10.10 or 10.10.10 etc.
TARGET_VERSION="5.5.1.4395"
if [ ! -d "${APP}" ]; then
echo "Does not exist: ${APP}"
exit 0
fi
vercomp () {
@Chealion
Chealion / 1804_vGPU_Desktop.sh
Last active July 2, 2019 21:48
vGPU to Desktop
#! /bin/bash
# This script is based on https://github.com/cybera/openstack-images/blob/6de2d7a91d05e8725823a13555a53aff4c9325f3/packer_files/UbuntuvGPU.sh
sudo apt-get install -y xubuntu-desktop libglu1-mesa-dev libx11-dev freeglut3-dev mesa-utils dictionaries-common
#TurboVNC and VirtualGL
cd
mkdir t
pushd t
### Keybase proof
I hereby claim:
* I am chealion on github.
* I am chealion (https://keybase.io/chealion) on keybase.
* I have a public key ASDql-CrTxm6YcmeCSepHAUDPOJCzG456ip4-wRwvZZ77wo
To claim this, I am signing this object:
@Chealion
Chealion / suffixImport.py
Last active January 12, 2016 22:46
Import publicsuffix.org to Designate's TLD using the API
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Usage: Source your openrc file, run python suffixImport.py.
# This imports publicsuffix.org via the TLD API instead of designate-manage tld import which can use a .csv file.
# Does not handle deletions but will import additions if downloaded later.
import logging
import requests
@Chealion
Chealion / glance_trim.go
Created August 29, 2015 18:59
Script to learn go - grab list of images from OpenStack, compare to list of files. Output list to delete
package main
/* Be sure to have sourced an admin's openrc */
import (
"fmt"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/openstack"
"github.com/rackspace/gophercloud/openstack/compute/v2/images"
"github.com/rackspace/gophercloud/pagination"
@Chealion
Chealion / TwitterArchiveMoreInfo.py
Created February 27, 2015 20:09
Uses sixohsix twitter library and jq.
#! /usr/bin/python
# Takes a monthly json file from your Twitter Archive - spits them out and then gives you a monthly total of mentions, retweets, favourites.
import json
import os
import sys
import subprocess
from twitter import *
#!/bin/sh
echo "This job runs via upstart, invoking upstart now..."
exec initctl $1 iperf
#vagrant plugin install vagrant-openstack-plugin
#vagrant box add dummy https://github.com/cloudbau/vagrant-openstack-plugin/raw/master/dummy.box
# MUST RUN vagrant up --provider openstack
# Thanks Joe!
# Ubuntu 14.04: f02b5616-6491-4cae-be53-06f360f8dced (TEMP)
# Ubuntu 13.10: 1039d5c9-7c78-499e-84e9-62275d0f87bc
# Ubuntu 12.04: 6ad274e3-9fd9-40ae-9e4f-2e5fec13bebe
require 'vagrant-openstack-plugin'
@Chealion
Chealion / sync_folders.rb
Created April 13, 2014 23:30
sync_folders.rb from vagrant-openstack-plugin with IPv6 support backported in.
require "log4r"
require "vagrant/util/subprocess"
module VagrantPlugins
module OpenStack
module Action
# This middleware uses `rsync` to sync the folders over to the
# remote instance.
class SyncFolders