yannis assael | the blog

  • Home
  • About
  • Categories
    • Android
    • Computing
    • iOS
    • Machine Learning
    • MacOSX
  • GitHub
  • Mobile Apps
  • yannisassael.com


AzureRM PowerShell Mac OS X

Written by iassael on 10/02/2017. Posted in computing, macosx

I recently had to install Powershell on my Mac (sigh) (bigger sigh) and I run into issues by trying to get AzureRM to work. Among others:

Login-AzureRmAccount : The ‘Login-AzureRmAccount’ command was found in the module ‘AzureRM.profile’, but the module could not be loaded. For more information, run ‘Import-Module
AzureRM.profile’.
At /Users/iassael/Drive/Code/projects/azure/BulkAddAAD.ps1:5 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Login-AzureRmAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Everything can be resolved by installing AzureRM from here:

Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2/ -ProviderName NuGet -ExcludeVersion -Destination $home/powershell/modules
Import-Module $home/powershell/modules/AzureRM.Profile.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.Resources.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.NetCore.Preview
Login-AzureRmAccount

PS. Import-Module would have to be rerun every time powershell is restarted.

  • Continue Reading
  • No Comments

OpenMP for Mac OS X El Capitan (Torch7)

Written by iassael on 14/03/2016. Posted in computing, machine learning, macosx

Having followed a plethora of guides to achieve proper OpenMP support on OS X, this is how it can be done:

  1. Install Homebrew
  2. run “brew update” (don’t skip that 🙂 )
  3. run “brew install clang-omp”
  4. add the following lines to ~/.profile
    export PATH=/usr/local/bin:$PATH

    # CLANG-OMP
    export CC=clang-omp
    export CXX=clang-omp++

    # Brew Libs
    export C_INCLUDE_PATH=/usr/local/include:$C_INCLUDE_PATH
    export CPLUS_INCLUDE_PATH=/usr/local/include:$CPLUS_INCLUDE_PATH
    export LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH
    export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH

  • Continue Reading
  • No Comments

Totally remove TimeMachine Backups.backupdb

Written by iassael on 19/09/2015. Posted in computing, macosx

To avoid command line errors with a simple sudo you have to run the following command:

sudo /System/Library/Extensions/TMSafetyNet.kext/Contents/Helpers/bypass rm -rfv /Volumes/[disk]/Backups.backupdb/

replacing [disk] with your drive’s name.

  • Continue Reading
  • No Comments

Fix Photo Booth’s Black Screen in Yosemite

Written by iassael on 03/02/2015. Posted in computing, general, macosx

photobooth_for_win7_by_amir1122-d40s714There are several reasons this problem could be caused. In my case, running Yosemite 10.10, Photo Booth had a black screen and the menu was saying “no camera connected” although FaceTime worked fine.

The common sudo killall VDCAssistant solution didn’t work at all, as well as, reseting my NVRAM.

After a lot of debugging and trial and error, I found out that the problem originated from the fact that I used Dropbox and had created a symbolic link in the place of the ~/Pictures folder.

The solution is to open ~/Library/Preferences/com.apple.PhotoBooth.plist with Xcode and change the link of ~/Pictures/Photo Booth Library to the absolute path of your new pictures folder.

Cheers~

  • Continue Reading
  • No Comments

Block Spotlight from sharing your searches with Apple

Written by iassael on 16/11/2014. Posted in computing, general, macosx

mac-spotlight-empty

How to restore privacy:

Disable “Spotlight Suggestions” and “Bing Web Searches” in System Preferences > Spotlight > Search Results.

Safari also has a “Spotlight Suggestions” setting that is separate from Spotlight’s “Spotlight Suggestions”. This uses the same mechanism as Spotlight, and if left enabled, Safari will send a copy of all search queries to Apple.

You’d be forgiven for thinking that you’d already disabled “Spotlight Suggestions”, but you’ll also need to uncheck “Include Spotlight Suggestions” in Safari > Preferences > Search.

Advanced users can download the python script: fix-macosx.py to take care of the changes. (first install pyobjc using pip: pip install PyObjC)

Source: https://fix-macosx.com/

  • Continue Reading
  • No Comments

Homebrew: ruby bad interpreter: No such file or directory

Written by iassael on 03/06/2014. Posted in computing, macosx

After installing 10.10 DP1 Yosemite (yeah I couldn’t resist the temptation) homebrew gave me the following error:

/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory

This error can easily be fixed in the following steps:
1) Open terminal

2) nano /usr/local/Library/brew.rb

3) In the first line change “1.8” to “Current”, so it should look like this:

#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0

Cheers~

  • Continue Reading
  • 16 Comments

uTorrent stuck at Checked 0.0%

Written by iassael on 27/10/2013. Posted in computing, macosx

If you experience such a problem with uTorrent app when you add a new torrent follow these steps:

OS X
1) Open Terminal and execute this command:
cd “~/Library/Application\ Support/uTorrent” && sudo rm -f *.old
2) Open uTorrent and everything should be back to normal

Windows
1) Open Windows Explorer and navigate to the path: %AppData%/uTorrent
2) Then remove all files ending *.old
3) Open uTorrent and everything should be back to normal

  • Continue Reading
  • 6 Comments

Chrome Spelling for non System Language MacOSX

Written by iassael on 05/03/2013. Posted in macosx

chrome logo

In order to make chrome check your spelling for a different language rather than the system’s (in this example Greek) you can run the following command in your Terminal.app

defaults write com.google.Chrome AppleLanguages ‘(el-GR)’ 

Για να ενεργοποιήσετε τον ορθογραφικό έλεγχο για Ελληνικά ενώ τα Αγγλικά είναι η προεπιλεγμένη γλώσσα του συστήματος σας εκτελέστε την παραπάνω εντολή στο Terminal.app . Δυστυχώς αλλάζει και η γλώσσα εμφάνισης του Chrome αλλά ενεργοποιείται ο ορθογραφικός έλεγχος ΕΠΙΤΕΛΟΥΣ!!! (:

  • Continue Reading
  • No Comments

Make Bootable USB from ISO – MacOSX

Written by iassael on 01/02/2013. Posted in computing, macosx

1) Partition your Disk with MBR (in options) in MSDOS FAT
2) Download Unetbootin http://unetbootin.sourceforge.net/unetbootin-mac-latest.zip
3) Select your ISO and click ok
4) Make your partition Active by running:
diskutil list -> find the diskN (N: number)
sudo fdisk -e /dev/rdiskN
>f 1
>write
>exit
5) Ready to boot

  • Continue Reading
  • No Comments

Safari Tab Switching with CMD+Num

Written by iassael on 05/11/2012. Posted in macosx

Safari Tab Switching is a Safari SIMBL plugin which allow switching between tabs using Cmd+1-9.
https://github.com/rs/SafariTabSwitching

  • Continue Reading
  • No Comments