Skip to content

Instantly share code, notes, and snippets.

View RedcoatAsher's full-sized avatar
📍
🇬🇧+ 🇺🇸

Asher Peruscini RedcoatAsher

📍
🇬🇧+ 🇺🇸
View GitHub Profile
@RedcoatAsher
RedcoatAsher / Installation.md
Last active September 13, 2023 11:59 — forked from albertbori/Installation.md
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
@RedcoatAsher
RedcoatAsher / toggle-pip.applescript
Created February 13, 2023 16:47 — forked from danielrotaermel/toggle-pip.applescript
Applescript to toggle picture-in-picture globally - I assign this to a keyboard shortcut with better touch tool (cmd+ctrl+p). Make sure "Developer > Allow JavaScript from Apple Events" is enabled in Safari. Download BTT preset -> https://share.folivora.ai/sharedPreset/caa1198d-36dd-4aeb-89de-142bf39cc336
(*
Description: Applescript to open/close picture-in-picture in Safari
Supported Applications: Safari, IINA
Author: Daniel Rotärmel
Source: https://gist.github.com/danielrotaermel/201f549d5755ea886eb78bb660133722
Instructions:
Assign this to a global keyboard shortcut with better touch tool / hammerspoon etc. - suggested: cmd+ctrl+p.
Make sure "Developer > Allow JavaScript from Apple Events" is enabled in Safari.
Download the BTT preset here -> https://share.folivora.ai/sharedPreset/caa1198d-36dd-4aeb-89de-142bf39cc336
*)
@RedcoatAsher
RedcoatAsher / index.md
Last active April 4, 2020 22:08 — forked from ubergesundheit/index.md
ngrok on raspberrypi on systemd
  • Download ngrok binary
  • Create /etc/systemd/system/ngrok.service
  • Create /opt/ngrok/ngrok.yml
@RedcoatAsher
RedcoatAsher / keepalive_ngrok.py
Created April 4, 2020 02:01 — forked from just4give/keepalive_ngrok.py
ngrok forever on raspberry pi
import json
import subprocess
import time
from pathlib import Path
import atexit
import boto3
import requests
import datetime
#path where you have extracted ngrok execution file. Follow readme file to install on Pi
@RedcoatAsher
RedcoatAsher / free-sketch-never-ending.md
Last active February 13, 2020 00:19 — forked from molcik/free-sketch-never-ending.md
Modify Sketch 49 and above to never ending trial

How does it work

All you have to do, to extend your trial period, is go to Date & Time preferences and set date before you trial period has started. Then open your Sketch.app and set your time back to atomatic.

But this can be really annoying do it over and over. And you can do it from your terminal too! All you need is date command. To set specific date you it with date parameter in following format +%m%d%H%M%y (MonthDayHourMinuteYear).

sudo date 0102030405

So command above will set your Date & Time to Sun Jan 2 03:04:00 +07 2005. Now when you open Sketch.app everything should appear as trial has not expired yet. But you don’t want to have your computer with wrong date & time. So to set it back you can use following command, which will set your time according to apple time server:

@RedcoatAsher
RedcoatAsher / free-illustrator.md
Created February 7, 2020 21:23 — forked from molcik/free-illustrator.md
Illustrator never ending trial period

How Does It Work

All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Applications/Adobe Illustrator CC 2018/Support Files/AMT/AI/AMT. You can navigate there with this command:

cd /Applications/Adobe\ Illustrator\ */Support\ Files/AMT/AI/AMT

Then you have to open the file and edit it. You can use just nano editor in terminal.

@RedcoatAsher
RedcoatAsher / free-photoshop.md
Created February 7, 2020 21:21 — forked from molcik/free-photoshop.md
Modify Photoshop to never ending trial

How Does It Work

All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:

cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT

Then you have to open the file and edit it. You can use just TextEdit app.

open -a TextEdit application.xml