Skip to content

Instantly share code, notes, and snippets.

View matt-the-ogre's full-sized avatar

Matt Manuel matt-the-ogre

View GitHub Profile
@paulclip
paulclip / gpt2mdconvert.py
Created January 23, 2024 21:05
Python script to convert ChatGPT exports into markdown files, suitable for importing into Obsidian et al
# Convert ChatGPT conversations into markdown
# source: https://dev.to/gavi/convert-chatgpt-conversations-to-obsidian-markdown-format-p61
# Improvements (tried to match original coding conventions)
# 2023.08.10: Fix bug accessing 'parts' in node['message']['content']['parts']
# 2024.01.06: Updated get_conversation to handle non-string content parts, i.e. images (which are not currently included in the ChatGPT exports)
# 2024.01.20: Added link to conversation in ChatGTP using conversation_id, and also set time stamps correctly, esp. on macOS
import json
import os
@djaiss
djaiss / gist:85a0ada83e6bca68e41e
Last active January 1, 2024 22:44
Block Twitter/Facebook in your /etc/hosts
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net
@DenisCarriere
DenisCarriere / mls.py
Created December 14, 2015 19:04
MLS Scraper
import geocoder
import requests
import unicodecsv as csv
import time
container = {}
g = geocoder.google("New Brunswick, Canada")
url = "https://www.realtor.ca/api/Listing.svc/PropertySearch_Post"
PropertySearchType = {
@Remiii
Remiii / README.md
Last active March 6, 2024 19:52
How to delete Vault (AWS Glacier) 🗻

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
@matt-the-ogre
matt-the-ogre / bash_alias
Last active September 14, 2015 01:40 — forked from vitorbritto/bash_alias
dotfiles - bash alias
#!/bin/bash
# ------------------------------------------------------------------------------
# | System |
# ------------------------------------------------------------------------------
# Navigation
# -------------------
@ttscoff
ttscoff / play_all_voices.sh
Created April 21, 2015 01:15
A quick Bash loop to play all available voices for OS X say command
#!/bin/bash
# Arguments can include a quoted string to define the test string to be repeated
# If an argument is numbers only, it changes the rate at which to speak (words per minute, default 200)
play_all_voices() {
local voice
local rate=200
local test_string="How are you?"
for arg in $@; do
if [[ $arg =~ ^[0-9]+$ ]]; then
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:
@swarminglogic
swarminglogic / watchfile.sh
Last active March 4, 2024 14:44
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@BashedCrab
BashedCrab / JumpyOctopus.py
Created February 12, 2014 03:25
JumpyOctopus
from scene import *
from PIL import Image
import sound
import random
GAME_READY = 0
GAME_PLAY = 1
GAME_DYING = 2
GAME_DEAD = 3
#!/usr/bin/ruby
# tp-dailylog.rb - Log TaskPaper tasks completed on the current day to a Day One entry
# Brett Terpstra 2012 <http://brettterpstra.com>
#
# Run it with launchd at 11pm and forget about it
#
# Notes:
# * Uses `mdfind` to locate all .taskpaper files changed in the last day
# * Scans for @done(xxxx-xx-xx) tags in each line matching today's date
# * Does not alter TaskPaper files in any way