Skip to content

Instantly share code, notes, and snippets.

@lyralemos
lyralemos / showrss.py
Created February 4, 2018 20:29
Downloads torrents from showrss and adds them to transmission; Dependencies: Feedparser and Transmissionrpc
import os
import feedparser
import transmissionrpc as tm
script_dir = os.path.dirname(__file__)
downloaded_file = os.path.join(script_dir, 'showrss.downloaded')
base_path = '/media/seagate/Video/Series/'
feed_url = 'http://showrss.info/user/448.rss'
feed = feedparser.parse(feed_url)
@fgr0
fgr0 / _tmutil
Last active January 10, 2023 00:14
zsh autocompletion for macOS tmutil
#compdef tmutil
# Autocompletion for macOS `tmutil`
#
# utility functions
#
# tmutil <verbs>
__tmutil_verbs() {
local -a allverbs
@mohanpedala
mohanpedala / force_delete_user_in_mac.md
Last active March 9, 2022 09:14
Force Delete user in mac

Can’t Delete Original Admin User on macOS High Sierra

I recently migrated to a new MacBook Pro. The old one was on High Sierra, but the new one wasn’t. So I created a temp β€œadmin” account to do the upgrade, then do the migration with Migration Assistant.

All seemed okay, but when I went to delete the original user account, I couldn’t. And I don’t mean β€œyou don’t know how to delete accounts” couldn’t. I mean, I tried every possible way, and it wouldn’t couldn’t.

I found this thread on the Apple forums with people having the same problem. After trying everything else, this is the solution shared in one of the replies that worked. Warning, I have no idea of the side effects this might have, but so far so good for me. Also, do not come crying to me if it totally hoses your machine. You’ve been warned!

@jaredmales
jaredmales / rclone-cron.sh
Last active February 20, 2025 08:08
An rclone backup script for cron
#!/bin/bash
##############################################################################
# An rclone backup script by Jared Males ([email protected])
#
# Copyright (C) 2018 Jared Males <[email protected]>
#
# This script is licensed under the terms of the MIT license.
# https://opensource.org/licenses/MIT
#
@jkereako
jkereako / startup.applescript
Last active August 22, 2020 18:01
Toying with a start-up script for my MacBook Pro.
# Open Safari
tell application "Safari"
# Default to HackerNews
open location "https://news.ycombinator.com"
activate
end tell
# Open Outlook if you have it.
try
tell application "Microsoft Outlook"
@wkoszek
wkoszek / click.oscript
Created January 19, 2018 22:22
Clicking "Allow" button in System Preferences via Screen Sharing
# This is clicking "Allow" in System Preferences "Security & Privacy" screen
# when you're on Screen Sharing. Otherwise it doesn't work.
# To fix:
# - Put "Security & Privacy" window in the top left screen
# - open a Terminal on a side
# - save click.oscript
# - Run: osascript click.oscript
#
# The mouse click you send should hit "Allow" button. You may need to move the window a little bit.
# Script originally from: https://discussions.apple.com/thread/3708948
@ipolyzos
ipolyzos / note_macosx_sublime_default_editor
Created January 16, 2018 18:11
Set sublime 3 as the default editor in MacOSX
## update homebrew
$ brew update
## install duti
brew install duti
## sublimetext 3 default editor for plain text files
duti -s com.sublimetext.3 public.plain-text all
## sublimetext 3 default editor for executable scripts
@svenmuennich
svenmuennich / .profile
Last active November 22, 2018 08:53
A plan for setting up a new Mac for development
# Load NVM
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
# ls coloring etc.
alias ls='ls -Ga'
# Fix Perl locale
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
@codingChewie
codingChewie / README-Template.md
Created December 19, 2017 15:07 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@oliveratgithub
oliveratgithub / emojis.json
Last active April 20, 2025 08:46
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘§", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘¦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "πŸ‘©β€πŸ‘©β€πŸ‘¦β€πŸ‘¦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘§", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z