iTerm3 and docker startup

If you open iTerm2 and try to run docker ps you’ll probably receive below error:

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

The solution to use iTerm2 instead of Docker QuickStart Terminal is relatively simple:

That will generate below output:

You then need to run:

The output of it is:

All you need to do now is to run:

That’s all 😉

 

Vagrant – Intro

Vagrant makes it possible to quickly create a virtual environment for development. It is different than cloning or snapshots in that it uses minimal base OSes and provides a provisioning mechanism to setup and configure the environment exactly the way you want for development.

Benefits:

  • All developers work in the exact same environment
  • Developers can get a new environment up in minutes
  • Developers don’t need to be experts at setting up the environment.
  • System details can be versioned and stored alongside code.

You need to create a single Vagrantfile and everything will be configured as you requested.

Vagrant is using different provides but by default VirtualBox is the free and easy to use.

We’ll use a separate work folder to keep things together.

You can download any vagrant image and keep it locally for future instantiation.

A huge list of vagrant images are available on HashiCorp’s Atlas box catalog.

The above script includes the fix for

bootstrap.ssh

If vagrant image is running you need to use

You can see the vagrant instance by browsing http://localhost:8000/

To share (you need to register to https://atlas.hashicorp.com/vagrant)

You can see it via http://delighted-jackal-2074.vagrantshare.com

To stop the VM:

or

Samsung M2020 on xUbuntu

Open gnome-terminal via xUbuntu dash or via shortcut ctrl+alt+t and paste following commands:

  1. Download driver from Samsung site:

2. Unpack the driver:

3. Install driver, with sudo command you need to enter your root password:

4. Now, you should be able to to add your printer via Printers program. Add it as network printer or simply plug it in via USB and it should work.

 

 

What Is Your Software Development Directory Structure ?

This is a fairly subjective topic as individuals or development groups each have their own philosophy. In this topic I’ll present mine. It you find that structure useful for you, at the end of this article you will be able to download the batch file to create the folder structure for you.

drive: I default to the D drive if I have one. Otherwise, C drive.

  • archive: This is my project junkyard, for projects I no longer maintain or use, but which I can’t quite bring myself to delete.
  • doc: This is a good place for general software development documentation, best practices docs, or process and procedures sorts of documents. A copy of this post will likely wind up there.
    • images: Contains supporting images for docs found in the doc parent folder.
  • resources: These are resources that span multiple products/projects, like a company logo, for example. You might need or want more than just the sub-folders I currently have defined.
    • icons
    • images
  • sandbox: My development sandbox. This is the ultimate in junk drawers, where anything goes. I dump sample code here, as well as ‘trial and error’ types of projects. None of it is ever checked-in. If I do want to check something from here in, it gets moved into a solutions folders.
  • setup: This is an environment-wide area for any utilities, batch files, etc. I use to setup my development or build environments. The batch file (download below) that creates my initial folder structure lives here, for example.
  • solutions:
    • iSCM (this is just a generic project name placeholder; rename as needed) This is where the .sln file lives. Individual projects then exist under the branches/tags/trunk subfolders.
      • backup: Sometimes I like to take zip file snapshots of my source, or I might have a version of some file that I want to hang on to separate from its source control location. Think of this as a generic project backup folder.
      • doc: This is for project-specific documentation, such as technical or design specs, or usage guidelines.
        • images
      • branches
      • tags
      • trunk
      • test
        • artifacts: So far this winds up being a repository for any files my integration tests require. Not all projects have integration tests, so not all project use this folder.
  • tools: This is where, broken down by sub-folder, every tool, gadget, utility, add-on, etc. that I use either for development or as part of my build environment, goes. This might include CruiseControl.NET, NUnit, ReSharper, etc. Basically any piece of software that I might need to download and install in order to restore my build environment or machine.

Click here to download folder structure.

How to set up your github repository in Ubuntu

Setting up on Ubuntu

Creates a new ssh key using the github email address:

Then copy it to the clipboard:

Then go to https://github.com/account/ssh and click “Add another public key” and paste the clipboard and press “Add” Key”.

And now try to connect to github to see if everything is working:

If everything goes fine you should have something similar:

Then you should install git (it should be already installed by default):

Now you can configure git:

Now get your token at GitHub -> Click “Settings” > Click “Personal Access Token”

You can create a github repository and clone locally.

 

MD5 encryption – with Linq

Here is a nice piece of code to do MD5 encryption. Click here for the original source code.

Easy RFC822 formatted dates with C#

How to add existing project to GitHub

Here is how you add an existing project to Github without cloning it first. One quick option is to create the repository on Github, clone it locally and then copy all the files across.

Go to your project

Initialize the repository:

You should see the following message:

Add all your files to the repo:

Check to see that there are changes to be committed:

You should see something like this:

In this case, my_project.info and my_project.module are the files I have in my project.

Commit the files.

Go to Github and create a new project repository and get the repo url: https://github.com/itabara/hello-world.git

Add Github as remote origin

Now we need to push our changes to Github.

Add this as the remote origin:

Pull from Github to local:

And finally, push the code to Github:

Additional references: