Tag Archives: macos

iOS and iPhone ring tone from video or audio file

In two easy steps you can convert any video or audio file to iOS ringtone.

  1. You need to convert the desired tone/music into M4R format first.
    For this you I use: https://www.online-convert.com/
    The nice option is that you can set start and end time (trim) the output file!
  2. If you are with MacOS, you can use Music app to upload the M4R ringtone using your iPhone cable.
    It is shown in this short video how to upload ringtone to iOS via Music app on Mac: https://www.youtube.com/watch?v=gdv5GTQFyGE

Как да си направите рингтон за iOS от видео или аудио файл в две лесни стъпки.

  1. Трябва да конвертирате желаната музика или звук в M4R формат първо.
    Аз използвам този сайт, който предлага и задаване да се отреже само част от музиката: https://www.online-convert.com/
  2. Ако сте с MacOS можете лесно с кабела на iPhone-а да си качите рингтона като използвате приложението Music:
    В това кратко видео е показано как се качва рингтон (мелодия за звънене) на iPhone чрез приложението Music на MacOS: https://www.youtube.com/watch?v=gdv5GTQFyGE

Schedule your Mac to turn on or off (sleep) in Terminal


You can use the pmset command line utility in Terminal to schedule specific times for your Mac to start up, sleep, restart, or shut down.

In the Terminal app on your Mac, enter a pmset command. Examples:

CommandDescription
pmset -g sched See the current schedule
sudo pmset repeat wake M 8:30:00 Schedule your Mac to wake at 8:30 a.m. every Monday
sudo pmset repeat cancel Cancel the current schedule. I was searching how to stop this routine I have setup long time ago.
Examples of PMSET command usage

How to allow apps to be downloaded and opened from anywhere on MacOS Ventura / Как да разрешим да се изпълняват програми свалени от интернет на Мак ОС Вентура

Open Terminal / Стартирайте програмата Терминал:

sudo spctl --master-disable

And in  Apple menu => “System Settings” => “Privacy & Security” => “Security” section select option:
“Anywhere”

MacOS / Logitech Lift and secure input problem

Interesting problem during setup of Logitech Lift mouse.

There is a secure input mode / flag on MacOS which prevents input devices in some cases from working / installing properly.

Below is a post on the topic in the Logitech support forum:

Logi Options+ issues recognizing devices on macOS when Secure Input is enabled

https://support.logi.com/hc/en-150/articles/1500010489082

To check if secure input mode is enabled and by which process do the following:

  • Launch terminal and go in directory /Applications/Utilities 
  • Execute command
    ioreg -l -d 1 -w 0 | grep SecureInput
  • If nothing returned, then the secure input mode is NOT active
  • Otherwise search for “kCGSSessionSecureInputPID”=xxxx in the returned output. The number xxxx points to the Process ID (PID). You can kill it and try again

Another guide for general setup of the Logitech software on MacOS Ventura (13.x):

https://support.logi.com/hc/en-150/articles/1500005514962#ventura

And the site to help you setup the mouse: ERGOsetup.logi.com

MacOS terminal improvements

Check which shell you use:

  echo $0

If it is bash you can continue editing bash settings:

  nano ~/.bash_profile

Add a line containing this:

  export PS1="\w\$ "

This will show you the current path in the terminal (bash).

And I like the short “ls -la” command to be set as alias “ll“, so I added also:

  alias ll="ls -la"

Remember to open new terminal window to get the new settings or execute:

  source ~/.bash_profile

That’s all for now!

BASE64 email raw attachment – Decode on MacOS

Take the attachment file which is Base64 encoded. The section should look like below. There is an opening string “–00000000000039139405d8b03aff” and closing with the same string “–00000000000039139405d8b03aff”. Your code will be different but beginning and ending will be always the same.

–00000000000039139405d8b03aff
Content-Type: application/msword;
name=”File22.doc”
Content-Disposition: attachment;
filename=”File22.doc”
Content-Transfer-Encoding: base64
Content-ID: <17f26f7ffc9d845639d2>
X-Attachment-Id: 17f26f7ffc9d845639d2

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAXgAAAAAAAAAA
pcEAa+ACBAAA8BK/AAAAAAAAEAAAAAAACAAA2jEAAA4AYmpialvdW90AAAAAAAAAAAAAAAAAAAAA

…………
…………
AAAAAAAAAAAAAAAAAA==

–00000000000039139405d8b03aff

Get the encoded text which starts on a new line and ends on the line before the last string “-00xxxxxx” (Bolded text below).

Method 1 – Save to text file and decode it

Save it as text file (base64.txt) in a directory.

Open it in Terminal , go to this directory and execute the command replacing the filename properly:

base64 --decode base64.txt > File22.doc

Method 2 – all in one command

base64 --decode > File22.doc
Paste_from_clipboard_the_encoded_text_here_VGhpcyBpcyBiYXNlNjQgZW5jb2RlZAo=

and press [ctrl+d] to send the pasted text.

Method 3 – use site for files up to 2MB

https://www.freeformatter.com/base64-encoder.html