Skip to content

Instantly share code, notes, and snippets.

jamesdh / gist:6315d675bd71a03479a9d7909dc1188b
Created Jun 9, 2022 — forked from mhucka/gist:59e785a315d813d14cd0258b89a2fcac
Stop the Adobe Creative Cloud app from auto-launching on login on macOS
View gist:6315d675bd71a03479a9d7909dc1188b
# =============================================================================
# @file GitHub gist
# @brief stop Adobe Creative Cloud app from auto-launching on login on macOS
# @author Michael Hucka <>
# @created 2021-08-12
# @website
# I find Adobe Creative Cloud absolutely infuriating. It installs auto
# launchers that are not in the user's login app list, and the services are

Generating Authy passwords on other authenticators

There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
jamesdh / nginx.conf
Created Apr 6, 2021 — forked from micho/nginx.conf
nginx config for http/https proxy to localhost:3000
View nginx.conf
First, install nginx for mac with "brew install nginx".
Then follow homebrew's instructions to know where the config file is.
1. To use https you will need a self-signed certificate:
2. Copy it somewhere (use full path in the example below for server.* files)
3. sudo nginx -s reload
4. Access https://localhost/
Edit /usr/local/etc/nginx/nginx.conf:
View Commands For Compress And Decompressesing
# Usage:
# mk* OutputFileName.* InputDirName
# do* InputFileName
# un* InputFileName.*
# tar
alias mktar='tar cvf'
alias untar='tar xvf'
# gz
jamesdh /
Created May 31, 2016 — forked from lukaszb/
Simple Python script to send notification to the OSX Notifications Center (requires OS X 10.8+). Tested with pyobjc 2.5.1
#!/usr/bin/env python
from Foundation import NSUserNotification
from Foundation import NSUserNotificationCenter
from Foundation import NSUserNotificationDefaultSoundName
from optparse import OptionParser
def main():
parser = OptionParser(usage='%prog -t TITLE -m MESSAGE')
View AppleScript for SelfControl
on run argv
# fill in your working hours here
set start_time_morning to convert_minutes(8.0)
set finish_time_morning to convert_minutes(12.3)
set start_time_afternoon to convert_minutes(14.0)
set finish_time_afternoon to convert_minutes(18.0)
# -----------------------------------------
set start_time_morning_secs to start_time_morning * 3600
set finish_time_morning_secs to finish_time_morning * 3600
set start_time_afternoon_secs to start_time_afternoon * 3600
View launchd file for SelfControl
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View pre-commit
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commit to forbidden branches
# (by default, "staging" and "production").
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable.
# The name of the file *must* be "pre-commit" for Git to pick it up.
FORBIDDEN_BRANCHES = ["staging", "production"]