FOLLOW ME Twitter Facebook Вконтакте LinkedIn RSS Feed
Browsing articles tagged with " howto"

How to restore unreadable USB flash drive under Mac OS X

Sep 1, 2013
Category: Tips and Tricks

USB Flash Drive recovery Today I found that I can’t access to my 8Gb USB flash drive. I can find it in Finder, but the System gets stuck while accessing to it. What to do? If you want to recover data from a USB flash it’s better to stop reading this post now and continue googling “USB flash data recovery” or something. Here’s a step-by-step instruction how to make your USB flash drive work again under Mac OS X.

1. Open Terminal and go to /dev

$ cd /dev

2. Now it’s time to find your flash drive in /dev. Typically it’s /dev/diskN where N could be 0, 1, 2, 3, etc

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *8.1 GB     disk3
   1:                        EFI                         209.7 MB   disk3s1
   2:       Microsoft Basic Data KB                      7.9 GB     disk3s2

OK! It’s disk number 3, i.e. /dev/disk3 Remember the name of partition (it’s KB in my case). Your flash drive is mounted as /Volumes/NAME Continue reading »


How to setup a private git repository on Debian using Gitosis

Apr 19, 2012
Category: Tips and Tricks

In this post I’m going to give you step by step instructions of how to setup your own git repository. I’ve got a VDS (Virtual Dedicated Server) running on Debian 6.0.4, but all steps are valid for Ubuntu too.

First of all we should setup all necessary tools including git:

apt-get install git python-setuptools python-dev

After that, get gitosis sources. Official repository git://eagain.net/gitosis.git stopped working, so use github repository instead:

git clone https://github.com/tv42/gitosis.git
cd gitosis
python setup.py install

Check that you’ve got sudocommand installed and if it’s not install it.

apt-get install sudo

I didn’t have sudo installed on my VDS so that’s why I care about it.
Ok, then create and add a gitosis user:

sudo adduser --system --shell /bin/sh --gecos 'gitosis user' 
             --group --disabled-password --home /home/git git

Now it’s time to set up a security connection between your local machine and the server. If you already have a private key and you know what is that, just skip the next step. Otherwise, you should generate keys on your local machine.

ssh-keygen -t rsa

If you’re a Windows user, you should find some way to generate security keys. For instance, use PuTTY gen.

Next step is to copy your public key to the server. Continue reading »