Skip to content

Instantly share code, notes, and snippets.

View zverhope's full-sized avatar

Zachary Verleyen-Hope zverhope

View GitHub Profile
@albertbori
albertbori / Installation.md
Last active July 17, 2025 17:51
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@steve-jansen
steve-jansen / README.md
Last active December 13, 2024 23:29
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
tell application "Skim"
set theFile to the file of the front document
set outText to ""
set newLine to ASCII character 10
# Get the relevant bibliographic information for the front PDF in Skim
tell application "BibDesk"
repeat with currentPub in publications of front document
if linked file of currentPub is {} then
set bibFile to 0
@fractaledmind
fractaledmind / action_export-notes.scpt
Last active July 9, 2020 14:53
Cleaned up the script. Made it more readable. Removed unnecessary stuff.
(* ///
PROPERTIES
/// *)
--Formatting
(* DO NOT CHANGE *)
property line_feed : (ASCII character 10)
property md_line_feed : (ASCII character 32) & (ASCII character 32) & (ASCII character 10)
property as_delims : AppleScript's text item delimiters
@fractaledmind
fractaledmind / pythonista_searchlink
Created April 13, 2014 19:20
Pythonista SearchLink
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 6, 2025 10:00
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 8, 2025 15:03
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@fractaledmind
fractaledmind / MMD-Citekey2MMDref_bibtex
Created February 4, 2014 16:17
Convert MMD cite keys (i.e. [#cite-key] or [#cite-key;]) to formatted references and citations using a BibDesk .bib database file.
property tid : AppleScript's text item delimiters
--these file types represent all of the options in BibDesk
property filetypes : {"article", "book", "booklet", "commented", "conference", "glossdef", "inbook", "incollection", "inproceedings", "jurthesis", "manual", "mastersthesis", "misc", "periodical", "phdthesis", "proceedings", "techreport", "unpublished", "url", "electronic", "webpage"}
property fieldtypes : {"address", "annotate", "author", "booktitle", "chapter", "crossref", "date-modified", "doi", "edition", "editor", "howpublished", "institution", "issn", "journal", "key", "month", "note", "number", "organization", "pages", "publisher", "school", "series", "title", "type", "url", "urldate", "volume", "year"}
set t to the clipboard
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active June 9, 2025 22:16
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*