Skip to main content

Questions tagged [macos]

macOS (formerly known as OS X or Mac OS X) is the desktop operating system from Apple, found on Macintosh computers.

2 votes
3 answers
149 views

Python Program Automatically Changing Mac Wallpaper to Nasa's Astronomy Picture of the Day

...
Astrovis's user avatar
  • 121
6 votes
1 answer
560 views

Play Snake Game on Mac OS Terminal using C with ncurses Library

Made a simple snake game in C. I am just having some fun with program and using this as a spring board of knowledge in hopes to get some confidence to maybe try different kinds of projects. I am ...
Alf's user avatar
  • 63
1 vote
1 answer
75 views

Javascript CLI to boot iOS simulators, install project, extract data, and merge into JSON

I'm a DIY "dev" - so I really create things that I need or think they'll end up helping others. I wrote this Swift Package so the iOS community could get device bezel radius' to help with UI ...
markb's user avatar
  • 171
4 votes
1 answer
2k views

Efficiency of wgpu-based 2D Batch Renderer

I've been working on a WebGPU-backed Rust renderer that batches together 2D colored sprites. I hadn't gotten onto the "sprite" portion of it yet, but I'm already finding some performance ...
n77's user avatar
  • 41
2 votes
1 answer
120 views

macOS: resetting balance to center (0.5) using Swift

Due to some bug somewhere, my speaker balance kept moving off-center and it was getting annoying. So I cobbled together the code below (based on this question) which—to my surprise—does compile and ...
luckman212's user avatar
10 votes
2 answers
1k views

Wi-fi scheduler written in C

I'm new to C and programming in general (some minimal prior exposure to JS and python). This is also my first time working with shell commands, scripts, and cron. This program works on my macOS and ...
NNNComplex's user avatar
3 votes
1 answer
104 views

Break music player into usable components in SwiftUI

I created a music player using swiftUI.I need to ask a question when I break up my player into usable components. How should I take this approach with the music player? because the music player is one ...
NinjaDeveloper's user avatar
1 vote
2 answers
242 views

Trying (and failing) to implement the best conventions on OOP Swift

I'm making a MacOS app that will do some analysis on the user's calendar data. For now it only supports Apple's native calendar (EventKit), but I will later add ...
Cornwell's user avatar
8 votes
2 answers
1k views

realpath substitute with --relative-to and --relative-base support

In a bash 3 script for OSX machines, I needed the functional equivalent of the realpath command, complete with support for the ...
Martijn Pieters's user avatar
2 votes
0 answers
22 views

bash script to delete files resurrected by Adobe InDesign bug

After a March update, Adobe Indesign will resurrect removed directories it was responsible for creating in the first place, but not any files except for one file called "AdobeFnt.lst". So where once ...
John Quirk's user avatar
2 votes
1 answer
127 views

Moving files from a directory to multiple with names same as file

I have a folder containing thousands of files and directories. I would like to move all the files that are not contained in a sub directory into a directory and name it the file name, while ...
aki's user avatar
  • 824
2 votes
0 answers
43 views

Bash script to scp specific, most-recent files from remote server

I'm writing a helper script that I wish to be able to share with my co-workers. We all work using macOS Mojave, but all have their own shell configurations. For example, I actually use ZSH and bash 5....
dylanjm's user avatar
  • 225
2 votes
0 answers
27 views

Auto re-connecting to a VPN on OS X and pointing Squid accordingly

We need to tunnel certain applications over a VPN at work. Ideally we would use a dedicated firewall/network appliance for this but the only permanent infrastructure we have are Mac Pro's running ...
Al Longley's user avatar
3 votes
1 answer
111 views

Batch rename files recursively, and number the directory index

When dealing with iOS app bundle, It is not convenient to get the file by its path, but loading it by its name. Need to batch rename images recursively, with Mac Bash. And to make the name unique, ...
dengST30's user avatar
  • 207
3 votes
1 answer
41 views

Batch rename files with Mac Bash,while the dir index should be recorded

I need to batch rename images with Mac Bash,while the directory index should be recorded. To rename files ,turn ...
dengST30's user avatar
  • 207
3 votes
1 answer
44 views

SSH autokiller for connections from other systems

I was messing around with ssh and decided to write a python program that scans for any connections that aren't from the system, then terminates them. It works well ...
Linny's user avatar
  • 10.3k
5 votes
1 answer
78 views

Java program that relaunches itself in OS's terminal application

I wrote a Java program that when its executable .jar is opened manually, it re-opens itself inside the operating system's shell console. The purpose of this is to have a C#-style console application ...
potato's user avatar
  • 1,122
1 vote
2 answers
702 views

Drawing graphics and text using macOS Core Graphics

I have a small python project, which draws graphics and text onto a graphics context using MacOS's Core Graphics APIs. The idea is to make it easy for the user to write a few short lines, in order to ...
benwiggy's user avatar
  • 113
1 vote
1 answer
31 views

Mac Bash: how to combine the open and str subtract to one line code? [closed]

new to bash , I use the following code to open the super folder with a file path. function openUp(){ cd $(echo $1 | sed 's@\(.*\)/.*@\1@' ); open .. } like ...
black_pearl's user avatar
8 votes
4 answers
3k views

Reporting new USB storage devices on Linux and macOS with Python

Synopsis: I wanted something for macOS (and Linux; maybe eventually Windows) that would simply wait for the user to connect a storage device and automatically select, or otherwise output the ...
voices's user avatar
  • 767
1 vote
0 answers
236 views

Alt-Coin Wallet QT Project for Mac OS-X

I was told my QT Project file is a hot mess. I'm returning to C++ after many years of doing Java and I'm really new to QT. I would like someone familiar with QT Project files to give my code a once ...
David Whitehurst's user avatar
7 votes
1 answer
10k views

File path unified in Windows/MacOS/Linux

We are all tremendously happy about back slashes in Windows file systems and do not think that their sole purpose is to make life complicated for smart people who are capable of using different OS. ...
Dmitry Nogin's user avatar
  • 6,131
4 votes
0 answers
105 views

appleseed command line widget (CLW)

─── appleseed on GitHub appleseed v1.0.0 is a command line widget (CLW), I designed for macOS and iTerm2. Its a flexible platform for process automation and added eye candy. It utilizes ...
Matt's user avatar
  • 143
2 votes
1 answer
89 views

Check SMART status on MacOS and pop up alert

So I don't know much about bash scripting. I am just a beginner. I made this script which checks the SMART status of my root volume and if it is failing then it immediately throws a pop up alert if ...
Doe's user avatar
  • 21
3 votes
2 answers
80 views

Password string generation

I'm trying to create passwords using the following snippet to match a custom password policy. I've added three gtr statements, at the end of the string, to ...
TheAuzzieJesus's user avatar
4 votes
2 answers
744 views

A C++ wrapper for Apple CoreFoundation

The wrapper makes it easy to manage memory when using CoreFoundation objects. It aims to act like a simple shared_ptr. Here is a usage example: ...
Ben-Uri's user avatar
  • 143
8 votes
1 answer
92 views

Spoofs MAC Address to manufacturer of user's choice, Linux or MacOS

I've made a BASh script for Linux/MacOS that allows you to search for a MAC manufacturer and then generates a MAC address from that company and then spoofs it to that using ...
anonymous's user avatar
  • 203
7 votes
2 answers
280 views

Script to temporarily drop admin privileges

Description The aim of my project is to allow administrators to drop privileges for reasons of self-control. Currently, it works only on MacOS Sierra but the concept should be extensible to any Unix ...
Miheer's user avatar
  • 121
2 votes
0 answers
415 views

Find MIDI devices with certain names and make them usable

I'm working on a Swift app for macOS, where I take input from MIDI devices and transform that input. The MIDI devices being supported come in for flavors. What my code does is scan for MIDI devices, ...
Wesley Peeters's user avatar
4 votes
2 answers
69 views

Create and open a file to take lecture notes depending on day and time

I am just wondering what, if any, more elegant ways might exist to write a script to accomplish the task that the script below accomplishes. The script works, so I don't need it to be debugged, but I ...
dlk0606's user avatar
  • 43

15 30 50 per page