Skip to content

Instantly share code, notes, and snippets.

@specter119
specter119 / zot_rm_empty_folders.py
Last active February 1, 2023 07:44
remove empty folders in `storage`
#!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import configparser
import re
import shutil
import sys
@korylprince
korylprince / merge.py
Last active January 29, 2025 17:27
Modify 10.13 (SFL2) Server Favorites list
#!/usr/local/munki/munki-python
# change the above path to your own python if you don't have Munki installed
"""
Merges add_servers into current favorites and removes remove_servers.
Run as root to update all users or as normal user to update just that user.
"""
import os
import getpass
#/etc/sysctl.conf
kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=1048576
net.inet.tcp.recvspace=1048576
net.inet.tcp.win_scale_factor=8
net.inet.tcp.autorcvbufmax=33554432
net.inet.tcp.autosndbufmax=33554432
@anupash
anupash / adblock-killer.txt
Last active July 11, 2024 20:08
adblock killer
This file has been truncated, but you can view the full file.
! Title: uBlock filters -- Annoyances
! Description: Filters optimized for uBlock Origin, to be used with Fanboy's
! and/or Adguard's "Annoyances" list(s)
! Expires: 8 days
! License: http://creativecommons.org/licenses/by/3.0/
! Homepage: https://github.com/uBlockOrigin/uAssets
! Forums: https://github.com/uBlockOrigin/uAssets/issues
! https://github.com/uBlockOrigin/uAssets/issues/1026
buzzfeed.com##[id^="mod-newsletter-signup-"]
@talkingmoose
talkingmoose / Add Completed Tasks to Bear Daily Notes.scpt
Last active November 23, 2020 21:24
Copies titles of completed tasks in Things to current Daily Note in Bear and marks it as done. Save this AppleScript to the Scripts folder for Things at ~/Library/Scripts/Applications/Things and call it using the system-wide AppleScript menu.
(*
----------------------------------------------------------------------------------
ABOUT THIS SCRIPT
Written by:William Smith
Professional Services Engineer
Jamf
[email protected]
#!/usr/bin/env ruby
require 'fileutils'
require 'nokogiri'
require 'optparse'
require 'erb'
def class_exists?(class_name)
klass = Module.const_get(class_name)
return klass.is_a?(Class)
rescue NameError
@palaniraja
palaniraja / merge-mp4.sh
Last active May 7, 2023 17:49
Bash script to merge all mp4 videos in current directory (recursively 2 levels). It also updates the chapter marks to retain the folder/filename of source dir
#!/bin/bash
## Script to merge all mp4 videos in current directory (recursively 2 levels)
## And update chapter marks to retain the folder/filename
## Script for merging videos
filename=`basename pwd`
current=`pwd`
@Falieson
Falieson / .zshrc
Created June 18, 2018 18:46
Linux Antigen .zshrc Config file
# Load NVM
export NVM_DIR="$(realpath $HOME/.nvm)"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Linux antigen file
source /usr/share/zsh-antigen/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
@huytd
huytd / customize.material-dark-theme.md
Last active September 2, 2023 13:03
My minimal Emacs config

;; Automatically generated
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(anzu-cons-mode-line-p nil)
@talkingmoose
talkingmoose / Add to Grocery List in Things.scpt
Last active February 24, 2019 13:56
When run from the AppleScript menu in any application, prompts for a new grocery item to add to the "Groceries" list in the "Household" area in things and sets the list to "Today". Creates the "Groceries" list if it doesn't exist and updates the "Groceries" list if it already exists. Save this AppleScript to the Scripts folder for all users at /…
(*
----------------------------------------------------------------------------------
ABOUT THIS SCRIPT
Written by:William Smith
Professional Services Engineer
Jamf
[email protected]