Category Archives: tools

Migrate svn to git repo from a local svn reposiroty

This is a how to migrate a svn repository or repository folder to git when you have full control on the svn repository.

  • I started to create a directory where I’ll do the job, (you can do the work where your current repo is located. you need svn and git to be installed on the machine)

mkdir C:\Temp\svn_migration

  • copy your repo in there, you should have something like this

svn_micgration_1

  • create a authors.txt file in the conf folder, copy the user from the passwd file

the structure of passwd file is sthg like

user = password

create a new authors.txt file in C:\Temp\svn_migration and use this layout. only the left hand side of the equal is relevant for us. (for the example above : user)

user = aName aLastName <auser@example.com>

  • start svnserve : from a cmd prompt, start the svnserve.exe for your repo. svnserve comes with subversion installation, but also with tortoisesvn.

"C:\Program Files (x86)\Subversion\bin\svnserve.exe" -d -R --root C:/Temp/svn_migration/svn_repository

  • start the migration. just issue the following command in C:\Temp\svn_migration

git svn clone svn://localhost/path/to/your/repo --no-minimize-url --no-metadata -A authors.txt someFolderName

note : The --no-minimize-url makes sure that git svn only clones the specific directory without trying to clone the root of the repository.

  • add a remote and push : finally you want to share it with other so:

cd to your git repo C:/Temp/svn_migration/someFolderName then

git remote add origin https://yourRemotegiturl

git push --set-upstream origin master

 

 

 

 

install apache benchmarking tool (ab) on windows

  1. download apache binaries from an apache recommended download site (i.e. :apache lounge)
  2. extract the content using zip tool
  3. copy the /bin/ab.exe to a folder of your choice (i.e.: c:\temp)
  4. start a command prompt and run it
ab -n 100 -c 10 http://yourserver/yourapi

or

# content.json contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
# -l Accept variable document length (use this for dynamic pages)

ab -p content.json -T application/json -H 'Authorization: Bearer xxxx' -c 10 -n 2000 -l http://myserver/myapi

Install Docker on windows 7 leads to error (ENOENT…)

When trying to install docker on windows 7, if you encounter this kind of error :

Command failed: C:\Program Files\Docker Toolbox\docker-machine.exe -D create -d virtualbox --virtualbox-memory 2048 default,Docker Machine Version: 0.8.2, build e18a919,Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe,Launching plugin server for driver virtualbox,Plugin server listening at address 127.0.0.1:53159,() Calling .GetVersion,Using API Version 1,() Calling .SetConfigRaw,() Calling .GetMachineName,(flag-lookup) Calling .GetMachineName,(flag-lookup) Calling .DriverName,(flag-lookup) Calling .GetCreateFlags,Found binary path at C:\Program Files\Docker Toolbox\docker-machine.exe,Launching plugin server for driver virtualbox,Plugin server listening at address 127.0.0.1:53163,() Calling .GetVersion,Using API Version 1,() Calling .SetConfigRaw,() Calling .GetMachineName,(default) Calling .GetMachineName,(default) Calling .DriverName,

or this kind of error

Error: connect ENOENT //./pipe/docker_engine

It’s because you followed the default installation that uses NDIS6 driver for virtualBox by default instead of NDIS5 (optional).

so when installing the docker toolbox from here : https://www.docker.com/products/docker-toolbox which is required for windows 7.

simply follow instruction, but when you arrive at the step “select additional tasks”, choose NDIS5 driver

setup-3

VSIX Extension : how to add an icon to your command

This post explains how to add an icon to your VSIX extension.
(this was done using visual studio 2015 and relates to the following project : CExtensions-EFModelGenerator. see the Extension project)

A. Get a .ico file. You can create one or get a png file and find a converter online… there are plenty of them.

B. open your *.vsct file and add a GuidSymbol Element. To generate the guid : from file menu : Tools => Create Guid

 <GuidSymbol name="EfModelCommand_Icon_Symbol" value="{363F9640-FBB7-4403-AB20-9A53EA067ECA}">
      <IDSymbol name="EfModelCommand_Icon_ID" value="1" />
 </GuidSymbol>

To generate the guid : from file menu : Tools => Create Guid, select registry format, copy and paste it

create_guid

Continue reading VSIX Extension : how to add an icon to your command

How Do I manage my OSS builds and versioning with MyGet.org and Nuget.org

I write this post, because everytime I start a new project, I wonder what is the correct configuration. So I will keep things in sync from here.

1. Build with Myget

nota : I use Myget for my dev builds and nuget only for beta, rc and prod releases.

  • First create a new feed from www.myget.org => simply click on New Feed button

Create_feed
Continue reading How Do I manage my OSS builds and versioning with MyGet.org and Nuget.org

Generate Poco classes from SqlServer or Oracle using CExtensions.EFModelGenerator

This post is about a new library CExtensions-EFModelGenerator for generating poco and dbcontext classes from Oracle or Sqlserver databases.
(support for other databases can be provided through customization).

with this library it could also be possible to generate code for java, javascript and other by implementing a custom Serializer (check the Test for mor info and more samples).

This post guides you through how to generate code from Sqlserver. (also check the Sample folder in the repo)
Continue reading Generate Poco classes from SqlServer or Oracle using CExtensions.EFModelGenerator