This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# by Matt Harzewski | |
# Read more: http://www.webmaster-source.com/2013/09/25/finding-a-websites-favicon-with-ruby/ | |
require "httparty" | |
require "nokogiri" | |
require "base64" | |
class Favicon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TweetbotImgurEndpoint { | |
private $api_key; | |
private $api_url = "http://api.imgur.com/2/upload.json"; | |
private $file_temp_location; | |
private $file_name; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Window nudging and resizing with modal shortcuts | |
-- Initialize with desired mode keybind: | |
-- windowmode.init({"cmd", "alt", "ctrl", "shift"}, "m") | |
-- Nudge window with arrows, resize with shift and arrows | |
-- HJKL is also supported | |
-- Space or return exits nudge mode | |
-- ------------------------------------------------------ | |
-- http://github.com/mattvh | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Converts an iPhone SMS.db file into HTML | |
# Mac: Library > Application Support > MobileSync > Backup | |
# Windows: C:\Users\<user name>\AppData\Roaming\Apple Computer\MobileSync\Backup | |
# Find the folder with the most recently modified date and open it. | |
# Locate the 3d0d7e5fb2ce288813306e4d4636395e047a3d28 file and copy it to the location of this script. | |
# Rename the file to "db.sqlite" | |
# Replace HANDLE_GOES_HERE with the phone number/etc identifying the other party in the DB. | |
# Run the script. | |
require "sqlite3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>{{ title }}</title> | |
<link rel="stylesheet" href="static/style.css"> | |
</head> | |
<body> | |
<div class="container"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import setup | |
APP = ['subreddit.py'] | |
DATA_FILES = [] | |
OPTIONS = { | |
'argv_emulation': True, | |
'site_packages': True, | |
#'iconfile': 'appicon.icns', | |
'packages': ['wx', 'requests'], | |
'plist': { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decorate(func): | |
print("Do something before func()") | |
func() | |
return func #return the original function, unmodified | |
@decorate | |
def hello(): | |
print("Hello, world!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Raspberry Pi Pushover IP Notifier | |
# by Matt Harzewski (2021) | |
# License: MIT | |
# | |
# On system boot, this script checks to see if | |
# the IP address has changed, and sends a | |
# Pushover notification if it is different. | |
# | |
# Set the user and application tokens with your | |
# own from Pushover.net, and add the script to |