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
@swarminglogic
swarminglogic / watchfile.sh
Last active January 1, 2025 19:07
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
----------------------------------------
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:
@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
@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
# -------------------
@Remiii
Remiii / README.md
Last active May 26, 2025 00:46
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
@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 = {
@djaiss
djaiss / gist:85a0ada83e6bca68e41e
Last active February 12, 2025 22:12
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
@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