Skip to content

Instantly share code, notes, and snippets.

View chris1111's full-sized avatar
🛠️
I'm still there

chris1111 chris1111

🛠️
I'm still there
View GitHub Profile
@chris1111
chris1111 / Create Install Media.scpt
Created April 7, 2024 13:17
AppleScript using the Terminal (do script) to create the disk
# By chris1111
#
# Copyright (c) 2024 chris1111. All Right Reserved.
# Credit: Apple
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@chris1111
chris1111 / AMFIPass-Extract.command
Last active October 17, 2024 17:50
AMFIPass-Extract
#!/bin/bash
# Extract AMFIPass.kext
# By chris1111
# get AMFIPass path
if [ "$2" == "" ]; then
echo -n "Please move to terminal window ➤ \ OpenCore-Patcher.app \
Followed by ENTER: "
@chris1111
chris1111 / macOS-RamDisk.tool
Created February 4, 2023 23:21
macOS-RamDisk
# macOS-RamDisk By chris1111
# Copyright (c) 2023, chris1111. All Right Reserved.
PARENTDIR=$(dirname "$0")
cd "$PARENTDIR"
printf '\e[8;35;80t'
BOLD="\033[1m"
RED="\033[1;31m"
GREEN="\033[1;32m"
Purple='\033[0;35m'
Blue='\033[0;34m'
@chris1111
chris1111 / Upload Image.html
Created December 24, 2022 13:11
Upload Image HTML
<!DOCTYPE html>
<html>
</head>
<body>
<div id="container">
<div align="center">
<h1>Image Upload</h1>
<span style='font-size:100px;'>&#8681;</span>
</div>
</div>
@chris1111
chris1111 / Rename Volume.scpt
Last active July 21, 2022 16:42
Rename Volume Applescript.scpt
# Rename volume if exist by chris1111
tell application "Finder"
set allVolumes to disks
repeat with aVolume in allVolumes
if (name of aVolume as text) is equal to "USB-DISK" then
set name of aVolume to "USB_DISK"
@chris1111
chris1111 / Terminal Profiler.scpt
Last active November 16, 2022 09:02
Terminal Profiler Applescript.scpt
# Apple Script by chris1111
# Copyright (c) 2021 chris1111 All rights reserved.
set Term to choose from list {"Pro", "Homebrew", "Basic", "Grass", "Man Page", "Novel", "Ocean", "Red Sands", "Silver Aerogel", "Solid Colors"} with title "Setup Terminal Profiles" with prompt "Which profiles do you want to uses?" default items "Pro" OK button name {"Profiles"} cancel button name {"Cancel"}
tell application "Terminal"
activate
end tell
do shell script "killall -c Terminal"
# Eject Disk image or External Disk Applescript
# Applescript from chris1111 2020.
# (I think is the only Applescript that does not crash if the disk that has to unmount does not exist)
# Change the name MYDISK to the name you want
tell application "Finder"
activate
if exists disk "MYDISK" then
tell application "Finder" to eject disk "MYDISK"
@chris1111
chris1111 / TirmEnabler Catalina.command
Created July 20, 2019 01:53
Enable or Disable the Trim in macOS Catalina 10.15
#!/bin/bash
# Simple script by chris1111
# Vars
apptitle="Trim Enabler Catalina"
version="1.0"
# Set Icon directory and file
iconfile="/System/Library/CoreServices/Expansion Slot Utility.app/Contents/Resources/AppIcon.icns"
# Select Trim Choice
@chris1111
chris1111 / Rename anny disk.scpt
Created June 27, 2019 16:02
Rename anny disk Applescript
# Applescript create by chris1111
tell application "Finder"
activate
# the original disk you want to rename
if exists disk "Catalina HD" then
# The name you want to give it
set theName to "Catalina-HD"
# the original disk you want to rename
set ORIG to "Catalina HD"
tell application "Finder"
@chris1111
chris1111 / appify.sh
Created March 7, 2019 03:59 — forked from oubiwann/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {