Author: admin

Change directory and folder permissions on mass

Change directory and folder permissions on mass

Recently, I was doing some work on the on a MediaWiki installation. For some reason I had all the permissions set up wrong.

Obviously, MediaWiki has thousands of files to change.

So first of all, in the shell, I ran the command from public_html directory:

find -xtype f |xargs chmod 644

That changed the the files. I then ran the following command from the public_html director:

find -xtype d | xargs   chmod 755

MacBook Pro GPU AMD Failure Method 3

MacBook Pro GPU AMD Failure Method 3

Who said Macs just work? So this is the third time a friends Mac has failed, and again, it is the GPU AMD. This time it wouldn’t boot, and it wouldn’t boot into recovery or disk selection. So what I had to do was a mix of method one and two.

WARNING – these worked for me, they may not work for you, ensure you take a full back up before performing any of these tasks, the read only disk image will be faster, but the read-write is better, it still took me two days to perform a backup for a 500GB disk. If your Time Machine is available, use that. The author of CheekyFactor.com will not be held liable for loss of data or broken machines. Do not perform these tasks if you are a novice.

So first, I went into single user mode and followed the instructions over here.

I rebooted, but I still couldn’t get it to boot, it just got so far and then rebooted. I tried to start ArchLinux as detailed in method 2, but no go. So I decided to go into recovery mode.

Go to Utilities and open terminal and performed the second part of method 2.

Once in recovery mode I opened the terminal:

If you have more than one partition run the following lines, if you only have one partition you can skip this bit:

diskutil cs list (find UUID for drive)

diskutil coreStorage unlockVolume UUID

Now, we all need to do the following, run the command:

cd /Volumes/Macintosh\ HD

Now, we need to remove the AMD Kexts, first create a directory where we can stick them on the off chance you need them in the future using the line:

mkdir AMD_Kexts_BU

Now, lets move those AMD Kexts:

mv System/Library/Extensions/AMD*.* AMD_Kexts_BU/

then type in reboot:

reboot

In theory, if you have done everything correctly, you should now have a working MacBook Pro.

BUT, please have in mind, this is not a permanent fix. When you upgrade or if you need to reset the SMC or NVRAM you will get the same error and you will need to perform the tasks above again.

Resetting Windows 10 to factory reset.

Resetting Windows 10 to factory reset.

So, my Dad got a second hand laptop, it was Windows 10 one. It was an Acer one.

The previous owner hadn’t reset the machine, so I was given the job of sorting it out for him.

So the first thing I needed to do was to get into the restore screen, when booting up on the Acer screen I pressed Alt and F10. This sent me to the restore.

I was given the option of doing a complete restore or a restore, but keeping the files and software. I opted for a complete restore. This took a few hours so I left it overnight.

Finally I was able to install Windows 10 as if it was a brand new computer. My final task is more cosmetic, but the machine is filthy, so will give it a good physical clean.

Customizing Cheeky Radio Pro

Customizing Cheeky Radio Pro

So, you have downloaded Cheeky Radio Pro, you have tested it and it works. Now it’s time to customize the App for your needs.

Thankfully, most of the hard work has been taken care of, you just need get your stream(s), change the images and the links to your station App for news and your website.

First of all, you may need to download the Apple design resources. I am using GIMP, hence I needed to download the PSD files.

Read more of this premium content
Opening an iOS app from another iOS app.

Opening an iOS app from another iOS app.

In this example, I am going to create a link from one iOS app, in this example, I am going to open the Cheeky News App with Cheeky Radio Pro.

First, open the Cheeky News app in Xcode:

Open the info.plist for the app:

Right click and add a new row and select URL types:

Over the Item 0, click on the + and select URL schemes:

In the third column, give the app a unique name, in this case CheekyNews.

Run the app.

In the app you are going to link from, the link you will use is CheekyNews//

In this example, Cheeky Radio Pro this goes in the PopUpMenuViewController.swift file:

The link in this example is called by:

@IBAction func NewsButton(_ sender: UIButton) {

        if let url = URL(string: “CheekyNews://”) {

            UIApplication.shared.open(url)

        }

    }

Run the app and make sure it works. Job done. Go and get a coffee, you deserve it.

MacBook Pro GPU AMD Failure Method 2

MacBook Pro GPU AMD Failure Method 2

As detailed in the post over there, a friend had an issue with MacBook pro with the GPU AMD failing. A few months later it  wouldn’t even boot. Couldn’t even get it into single user mode.

So, how did I get it working again. Well first of all I had a USB stick with a non-GUI version of Linux, I used ArchLinux. I won’t go into the details here, but I did have issues copying the ISO of ArchLinux onto a USB stick using my own Mac. You can see how I did this here.

WARNING – these worked for me, they may not work for you, ensure you take a full back up before performing any of these tasks, the read only disk image will be faster, but the read-write is better, it still took me two days to perform a backup for a 500GB disk. If your Time Machine is available, use that. The author of CheekyFactor.com will not be held liable for loss of data or broken machines. Do not perform these tasks if you are a novice.

OK, now to get this MacBook pro working again. Stick the USB disk in with ArchLinux on into the MacBook pro.

Power on the machine, ideally it needs to have the power cable attached to the machine. As soon as you hit power, press down the alt key at the same time.

You will get an option to either boot from the Macs hard drive, or UEFI. Select UEFI, you will see something like this:

Ensure you have the top item selected for ArchLinux and press e. As you can see at the bottom of this image you will see a line, at the end of that line add nomodeset and hit enter.

You will be booted into ArchLinux:

Change the directory by running the command:

cd /sys/firmware/efi/efivars

You will see something like this:

Run the command:

ls

That is an L not an I. Hit enter and you will something like:

What we are interest in is those GPU lines in the bottom left hand corner, they may not necessarily be there, you just need to look for something like this. But don’t worry if you can’t see them.

Now we have to unmount the efivars folder

Run:

cd /

umount /sys/firmware/efi/efivars/

mount -t efivarfs rw /sys/firmware/efi/efivars/

cd /sys/firmware/efi/efivars/

Then run:

run

chattr -i “gpu-power-prefs- then press tab and close it with a “
chmod ugo+w gpu-power-prefs- then press tab
rm gpu-power-prefs- and press tab to get the file

This will look something like this.

We now need to create a new gpu file that we can mute, run:

printf “\x07\x00\x00\x00\x01\x00\x00\x00” > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

Now to mute it, the chattr command makes it accessible only to the superuser, so in theory when you boot it won’t mess up, run:

chattr +i “/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9”

Now to flush the efivars cache by running:

cd /
umount /sys/firmware/efi/efivars/

In theory, we can now reboot, type in reboot. Initially I had issues booting, it got stuck and kept restarting. So I booted into recover mode by holding down command and R down on boot.

Once in recovery mode I opened the terminal:

If you have more than one partition run the following lines, if you only have one partition you can skip this bit:

diskutil cs list (find UUID for drive)

diskutil coreStorage unlockVolume UUID

Now, we all need to do the following, run the command:

cd /Volumes/Macintosh\ HD

Now, we need to remove the AMD Kexts, first create a directory where we can stick them on the off chance you need them in the future using the line:

mkdir AMD_Kexts

Now, lets move those AMD Kexts:

mv System/Library/Extensions/AMD*.* AMD_Kexts/

then type in reboot:

reboot

In theory, if you have done everything correctly, you should now have a working MacBook Pro.

BUT, please have in mind, this is not a permanent fix. When you upgrade or if you need to reset the SMC or NVRAM you will get the same error and you will need to perform the tasks above again.

I just hope this is a better solution than what was shown in method 1 which kept failing without the SMC or NVRAM being reset.

There is a permanent solution I have found on YouTube, but due to knowing how bad I am at soldering, I think I will pass on that one. But if you want to look at the permanent solution check this out.

But if you do that, you are on your own.