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
| #!/bin/bash | |
| # This script is designed to update and publish a chrome extension | |
| # that already exists in the Chrome Web Store. It also depends on | |
| # OAuth 2.0 credentials and a refresh token. | |
| # Required arguments | |
| # ================== | |
| # There are 2 actions you can perform: | |
| # 1. Update - upload a chrome extension to the Chrome Web Store |
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
| #!/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 |
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
| const hoverTime = 400 | |
| const fetchers = {} | |
| const doc = document.implementation.createHTMLDocument('prefetch') | |
| function fetchPage (url, success) { | |
| const xhr = new XMLHttpRequest() | |
| xhr.open('GET', url) | |
| xhr.setRequestHeader('VND.PREFETCH', 'true') | |
| xhr.setRequestHeader('Accept', 'text/html') | |
| xhr.onreadystatechange = () => { |
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
| F=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks | |
| for d in $(ls -d $F/*.framework); | |
| do | |
| sudo ln -s $d /Library/Frameworks/; | |
| done | |
| for d in $(ls -d $F/ApplicationServices.framework/Versions/A/Frameworks/*.framework); | |
| do | |
| sudo ln -s $d /Library/Frameworks/; |
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
| ;; switch to english input method when switching to normal mode | |
| ;; and switch back when entering insert/replace modes | |
| ;; need external script support, currently mac-only | |
| (defvar default-im "org.unknown.keylayout.layoutformc" "Default ascii-only input method") | |
| (defvar prev-im (substring (shell-command-to-string "/usr/local/bin/im-select") 0 -1) | |
| "IM that I use when starting Emacs and exiting insert mode") | |
| (defun im-use-english () | |
| "Switch to english input method on a Mac. im-select is a tool | |
| provided at https://github.com/daipeihust/im-select" |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>PayloadDisplayName</key> | |
| <string>Security & Privacy</string> | |
| <key>PayloadEnabled</key> |
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
| #!/usr/bin/env bash | |
| # This is a script that provides infinite history to get around Alfred's 3-month limit. | |
| # It works by regularly backing up and appending the items in the alfred db to a | |
| # sqlite database in the user's home folder. It also provides search functionality. | |
| # 🎉 A NEWER IMPROVED VERSION OF THIS IN WORKFLOW FORM: 🚨 | |
| # ➡️ https://alfred.app/workflows/mayjunejuly/clipboard-history-archive/ | |
| # https://www.alfredforum.com/topic/10969-keep-clipboard-history-forever/?tab=comments#comment-68859 | |
| # https://www.reddit.com/r/Alfred/comments/cde29x/script_to_manage_searching_backing_up_and/ |
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
| --[[ | |
| === HammerText === | |
| Based on: https://github.com/Hammerspoon/hammerspoon/issues/1042 | |
| How to "install": | |
| - Simply copy and paste this code in your "init.lua". | |
| How to use: | |
| - Add this init.lua to ~/.hammerspoon/Spoons/HammerText.spoon | |
| - Add your hotstrings (abbreviations that get expanded) to the "keywords" list following the example format. |
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
| #!/bin/bash | |
| <<ABOUT_THIS_SCRIPT | |
| ----------------------------------------------------------------------- | |
| Written by:William Smith | |
| Professional Services Engineer | |
| Jamf | |
| [email protected] | |
| https://gist.github.com/talkingmoose/9faf50deaaefafa9a147e48ba39bb4b0 |
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
| $ brew install ffmpeg | |
| $ ffmpeg -i <input.*> -ac 1 -ab 128000 -f mp4 -acodec aac -y -ss <beggining_second> -t <length_in_seconds> output.m4r # Length can't be higher than 30 seconds |