Saturday, July 15, 2017

Creating a GIT repository on a network drive

Use GIT to keep my source on anetwork drive

But if the source is on my PC only, it loses some of the main ideia [to keep my source code safe].
I could use github or something like that... But then it becomes open source...

Also, if I use a diferent machine, i want to use the same reposotory...

So...
Wit Linux, UBUNTU... How to do it?

The idea is to create a shared folder that maps to a network drive. And use that has the shared repository...
Then use git to pull / push from it!|

Mount network Drive

- Choose where you want [I am going to put it under "/home"
- Create the folder where you want to map it
      sudo mkdir /home/shared-git
- Mount the network drive
      sudo gedit /etc/fstab
 * add line
      //192.168.1.1/a/shared-git /home/shared-git cifs guest,uid=1000,iocharset=utf8 0 0
- Execute to re-mount drive
      sudo mount -a

Now i have a path mapped to the network!


Create a net repository on the shared path

- Create the repository
      cd /home/shared-git
      git init --bare
Push the repository to new location
      cd /[project path]
      git remote add origin /home/shared-git
      git push origin master
Now we have the repository updated !

Push the repository to new location

      cd /[project path]
      sudo git push -u origin master


To clone it on a diferente machine [with the same share folder]

      git clone /home/shared-git/ [folder]


To sync the local repository from shared folder

Fetch project
      git fetch origin
Clean current projecto
      git clean  -d  -fx ""
Get changes
      git pull

DONE !

Enviroment:

Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

Problems:

I had problems instaling
      sudo apt-get install cifs-utils

Errors were encountered while processing:
libmirprotobuf3:amd64
libmirclient9:amd64


Steps to fix it:
      sudo apt-get install --reinstall libmirprotobuf3
      sudo apt autoremove
      sudo apt-get update

Thursday, June 29, 2017

Link to see later

https://askubuntu.com/questions/397481/how-to-make-a-persistent-live-ubuntu-usb-with-more-than-4gb https://askubuntu.com/questions/168957/is-there-a-way-to-install-ubuntu-on-usb-pendrive-as-normal-instalation-not-live/168963#168963

Wednesday, February 26, 2014

WebSite - Backing Up

Do not forget to backup.

One of the good things about virtual machines is that, in the end, they are just a file!
Well, one ore more... But you get the idea...

To backup, just copy the files, or create a zip...

My basic idea is:
1. Create the virtual machine
2. Do the basic updates and configurations
3. Create basic backup

From this point I can create as many backups as I want, but can always reset the to the basic backup.
Can play with installation scripts until I have the right one, and then just run it against the basic instalation and have a clean system to work with.

Do not forget that backing up is not the same thing as having version control.

All the information is on the virtual machine (version control, databases, software, etc.) but you still have to have the necessary tools to work with.

But that will be on a next oportunity

Monday, January 20, 2014

WebSite - Operating System

The operating system is some what important...

There are very options, but I have decided to use Linux.
Is free and open source (some flavores).

It would take me forever to test all of then, so I decided the chose one.
My choice was UBUNTU (http://www.ubuntu.com/).

The virtual machine is VMWare Player that is also free (but not open source :-( )

The installation procedure is very simple.
Download the .iso file that has the Operation System.
I selected the desktop version. I want all the environment on one machine, so a desktop version allow me server and client tools.

Launch the VWPlayer:

Select the option create a new Virtual Machine and select the .iso file.


Configure the linux user and the name of the virtual machine as it location.


Finally decide the size of the disk file and finish the process.




Next... well, there is nothing more to do. Just install the operation System. Follow the instructions.
Simple, no?

Now we have a new virtual machine to work, without any impact on your computer.

Monday, January 6, 2014

WebSite - The enviroment

From my previous experiments, I have found that is very important to have the right tools.
You cannot do TDD with an environment that does not allow you to test the changes that you did in a very rapid way.

So I am going to start making some definitions (with no particular order):

  • It has to be Open Source software
  • Language: PHP
  • Database: MySQL (yes, is still early to decide if I am going to use or not, but for now...)
    • Every one has it
    • Is free
    • Is easy to install
  • Script as much as I can 
    • installations
    • configurations
  • Run on a virtual enviroement
    • It simplifies my life
    • Easy to backup
    • easy to rollback (you just restore an old version of the virtual machine)
    • Changes the base machine has no implication on the environment
  • Create the complete environment in a single machine
    • not complete sure about this one yet...
Going to create a page with the software that I am going to need and try to keep it updates [/p/configuration-files.html]

Starting a new Project - WebSite

I am going to start developing a website.
Is going to be something simple. Just a simple store with a shop car and a lite more functionality.

But I want to do it the right way!
That means using the correct Technics (what the hell does that mean?).
TDD, Continue Integration, version control, Integration tests, using Open Source projects, and so on...

It should be simple, no?

Tuesday, July 7, 2009

Mobile Fractal

I have finaly puted my first application on the web.

Is a simple application for windows mobile, using .Net framework 3.5.

It was an interesting experience so I could learn how to use sourceforge.net to keep the code and the deliverables.

The most difficult part was how to add files (screenshots and releases) to sourcefourge.

But, in the end, is done!

Take a look in https://sourceforge.net/projects/mobilefractal/