Skip to content

Instantly share code, notes, and snippets.

@fish2000
fish2000 / delicious-backup-2-json.py
Created December 17, 2010 16:56
Exporting from delicious.com (née del.icio.us) gives you crap HTML, this script reorganizes it into a JSON structure suitable for the high standards we have for datastructures here at the end of 2010.
#!/usr/bin/env python
# get it from https://secure.delicious.com/settings/bookmarks/export
# use the default options
# file will be named with a datestamp, like: 'delicious-YYYYMMDD.htm'
import os, re, site, sys
from BeautifulSoup import BeautifulSoup
try:
import json
except ImportError:
@Daniel15
Daniel15 / 1_Twitter autoresponder bot.md
Last active November 5, 2025 12:06
Twitter autoresponder bot

Twitter autoresponder bot

By Daniel15 (dan.cx) This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.

Could be modified to be more advanced (match regular expressions to answer questions, etc.)

Questions? See my blog post - http://dan.cx/blog/2011/06/twitter-autoreply-bot-dbznappa

Modified 2013-06-13 - Twitter API 1.0 discontinued, modified to use Twitter API 1.1

@NemoAlex
NemoAlex / gist:3551983
Created August 31, 2012 12:10
Set MplayerX - SeekStepTime
# Using Terminal set MplayerX SeekStep to 8s.
cd ~/Library/Preferences/
defaults write org.niltsh.MPlayerX SeekStepTimeR 8
defaults write org.niltsh.MPlayerX SeekStepTimeL 8
# Then restart MplayerX.app if it is running.
@jmuspratt
jmuspratt / mediaName
Last active March 15, 2025 04:20
exiftool : rename files in current dir to YYYY-MM-DD-HH-MM-SS-1.ext
# Function for your .zshrc file
# Requirements: install the package manager Homebrew (http://brew.sh), then install exiftool (type brew install exiftool in Terminal.app).
# Renames image and MOV files according to EXIF capture date, using YYYY-MM-DD-HH-MM-SS.ext format.
# Files shot within the same second get copy number added (-1,-2, etc.).
# Video files require a different, so we run exiftool 3 times:
# 1. Exclude MOV files and rename the image files with <CreateDate>.
# 2. Target MOV files and rename them with MediaCreateDate (for iPhone videos).
# 3. Target MOV files and rename them with DateTimeOriginal (for Fuji camera videos).
@jimcavoli
jimcavoli / release.yml
Created November 11, 2020 00:56
GitHub Actions workflows for custom Cloudron Apps
# Custom Cloudron App build/update workflow
#
# To use this template, ensure the following secrets
# * DOCKER_USERNAME
# * A Docker Hub account username
# * DOCKER_PASSWORD
# * The Docker Hub password for DOCKER_USERNAME
# * DOCKER_REPONAME
# * The repository belonging to DOCKER_USERNAME to push updates to
# * CLOUDRON_HOST
@thecodewarrior
thecodewarrior / App Icon Template.svg
Last active December 9, 2025 17:38
An SVG template for creating macOS app icons, including guides and the standard drop shadow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mbafford
mbafford / fix_payee_narration.py
Created November 30, 2021 12:23
Beancount - Fix payee/narration behavior to always have payee first and narration optional
#!python3
"""
Beancount has inconsistent behavior with payee/narrations.
If you have a line like this:
2020-01-01 * "Text1"
Then "Text1" is the narration

HP LaserJet P1102 Drivers for macOS Sequoia

This instructions provides a solution for installing HP LaserJet P1102 drivers on macOS Sequoia (15.0+). The official HP drivers don't install on the latest macOS versions, but with a simple modification to bypass the operating system version check, you can get your printer working again.

Supported Printer Models

  • HP LaserJet P1102
  • HP LaserJet Pro P1102
  • HP LaserJet Pro P1102w