Agras Zeta Atino

Un blog mas de tecnologia, locuras y procrastinacion

PostgreSQL and HTTP tools

Today i’ve read at Planet Postgres a post about an interesting tool which is meant to use Http as way of comunication to a postgresql database and json as return datatype, its name is pg_httpd.

Have a look at the comments, they’re very interesting, and the project looks very helpful.

This also made me remember of another tool, HTSQL, this is basicly the same, just a little more robust and written in Python. I’ts aim is basicly the same, just provide a simple way to access data stored in postgresql (Although HTSQL supports as many databases as your python’s database drivers installed). the great thing is that it even comes with fancy stuff to even create graphics.

HTSQL supports graphics, different output types and so on (You can take a look at their extensive tutorial here.

Again, both projects are extremely useful, just depending on what you need, you’d use one or the other (Or none).

Facebook Twitter Email

If you ever have the need to create a ISO image from a Pendrive/USB disk or a directory, this line might save your life.

Si en algun momento te has visto en la necesidad de crear una imagen ISO de un pendrive, disco usb o un directorio en particular esta linea podria salvar tu vida:

mkisofs -o name-of-your-image.iso /path/to/directory 

And that’s it, no sudo, no dd, no need to use more space than needed (a problem i found using DD)
Y eso es todo, sin sudo, sin dd, sin necesidad de usar mas espacio del requerido (un problema que encontre cuando trate de usar dd)

note: add -J if you’re planning to use that iso on windows
nota: agrega -J si vas a utilizar esa ISO en windows

Facebook Twitter Email

Git repository from scratch | Creando un repositorio GIT desde cero

Just go to the end of the post if you dont wanna read all of it
So you’ve been playing with git, and you’ve already done the common thing:

$ git init
$ git add .
$ git commit

And then, you decide to upload your code somewhere else than github, gitorius or anywhat lets you use git (and where the workflow is: first create the repo, clone, then develop). That’s when you meet it, the hell… Its very annoying specially when you just want quick development, and what you really need is to start something, after you finish you decide to track the code, and then you see yourself in something like this:

$ mkdir ../myproject-new
$ cd ../myproject-new
$ git init
$ mv ../myproject/* .
$ git add .
$ git commit

And then, you meet the unconfortable truth, you dont have a bare rep to push your changes… so you kind of start over, to create a new repo so you can clone from it (although its empty) then add your files, commit and push… An easy way to do this would be like this:

Say you have a local branch, no other locations to pull from or to push to, your only working copy, and want to upload somewhere… before going into the git init|add|commit|clone|add origin hell just do this within your working copy:

git clone --bare $(pwd) git://server.com/path.git

And that’s it, this will create a new bare directory under the the path you specified… with no additional setup, and no madness. So you can ask your team members to just clone from server.com/path.git and that’s it… Painless

Facebook Twitter Email
Social links powered by Ecreative Internet Marketing