Saturday, October 12, 2013

Install libimobiledevice on Mac OS X

So you'd like to manage your iOS devices by command line?
You can use libimobiledevice tools for that.
Easy on Linux. Let's see how it is on Mac OS X.

You'll need to:
1. install Xcode
2. start Xcode and agree to it's license
3. install Xcode command line tools (Start Xcode, Go to Preferences -> Downloads tab)
4. install homebrew by this command (sudo password will be prompted)

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

5. run following


brew install -s --HEAD libimobiledevice ideviceinstaller

6. ready to go


That's all, folks. Just a little more steps than in GNU/Linux.
So Mac OS X can really be of use by people.

Enable VNC Server on Mac remotely

Thanks, Apple! You've made life of many Unix admins easier by integrating some necessary stuff in OS X out of box.

To enable VNC Server on Mac when you have only SSH, fire this command.

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -configure -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw YOUR_PASSWORD  -access -on -users admin -privs -all -restart -agent -menu 


Src - don't rememmber. If i'll find it, I'll add.

Disable hibernate in Windows 7 and delete hyberfil.sys

1. powercfg.exe -h off
2. rm hyberfil.sys

Uninstall MacPorts from Mac


"Uninstalling MacPorts can be a drastic step" so they say. That's why my choice is HomeBrew!

So here it is. Might be your's will be with a little deviation.

%% sudo port -fp uninstall installed

%% sudo rm -rf \
    /opt/local \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/Receipts/DarwinPorts*.pkg \
    /Library/Receipts/MacPorts*.pkg \
    /Library/StartupItems/DarwinPortsStartup \
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0 \
    ~/.macports




Tuesday, October 1, 2013

How much memory can i insert into my Linux box

One could use dmidecode tool to get info about memory installed

$ dmidecode -t memory

# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0007, DMI type 16, 23 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: None
        Maximum Capacity: 16 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

Handle 0x0008, DMI type 17, 34 bytes
Memory Device
        Array Handle: 0x0007
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 4096 MB
        Form Factor: SODIMM
        Set: None
        Locator: ChannelA-DIMM0
        Bank Locator: BANK 0
        Type: DDR3
        Type Detail: Synchronous
        Speed: 1333 MHz
        Manufacturer: Hynix/Hyundai
        Serial Number: 0654A654
        Asset Tag: None
        Part Number: HMT351S7C5R6C-PB  
        Rank: Unknown
        Configured Clock Speed: 1333 MHz

Handle 0x0009, DMI type 17, 34 bytes
Memory Device
        Array Handle: 0x0007
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 8192 MB
        Form Factor: SODIMM
        Set: None
        Locator: ChannelB-DIMM0
        Bank Locator: BANK 2
        Type: DDR3
        Type Detail: Synchronous
        Speed: 1333 MHz
        Manufacturer: 029E
        Serial Number: 00000000
        Asset Tag: None
        Part Number: CMSO8GX4M1A1666C9 
        Rank: Unknown
        Configured Clock Speed: 1333 MHz