contact
----------------------------

Blog <-

Archive for the ‘projects’ Category

RSS   RSS feed for this category

Bexec v0.8: Execute a vim buffer and capture output in split window

I released v0.8 of my Bexec vim plugin. The Bexec plugin allows the user to execute the current buffer if it contains a script with a shebang (#!/path/to/interpreter) on the first line or if the default interpreter for the script's type is known by Bexec. The output of the script will be grabbed and displayed in a separate buffer. 

New in this release:

  • Honor splitbelow and splitright vim setting (patch by Christopher Pease).

bexec

Installation instructions:

  1. Download the Vimball
  2. Start vim with: vim bexec-v0.8.vmb
  3. In Vim, type: :source %
  4. Bexec is now installed. Type :Bexec to run it, or use <MapLeader>bx

 

 

bexec v0.6 released: Execute Vim buffers and show output in new buffer.

I've just released version 0.6 of my Vim bexec plugin. 

Bexec is a Vim plugin that allows the user to execute the current buffer if it contains a script with a shebang (#!/path/to/interpreter) on the first line or if the default interpreter for the script's type is known by Bexec. The output of the script will be grabbed and displayed in a separate buffer.

New in this version:

  • Support (fix) for Windows support. (by mohd-akram)

You can get the new version (as a Vimball) from:

bbcloner v1.3 released. BitBucket backup tool.

I've just released bbcloner v1.3. bbcloner creates mirrors of your public and private Bitbucket Git repositories and wikis. It also synchronizes already existing mirrors. Initial mirror setup requires you manually enter your username/password. Subsequent synchronization of mirrors is done using Deployment Keys.

This release features the following changes:

  • Support for updating over https (patch by msboom)

 

Quick-n-dirty HAR (HTTP Archive) viewer

HAR, HTTP Archive, is a JSON-encoded dump of a list of requests and their associated headers, bodies, etc. Here's a partial example containing a single request:

{
  "startedDateTime": "2013-09-16T18:02:04.741Z",
  "time": 51,
  "request": {
    "method": "GET",
    "url": "http://electricmonk.nl/",
    "httpVersion": "HTTP/1.1",
    "headers": [],
    "queryString": [],
    "cookies": [],
    "headersSize": 38,
    "bodySize": 0
  },
  "response": {
    "status": 301,
    "statusText": "Moved Permanently",
    "httpVersion": "HTTP/1.1",
    "headers": [],
    "cookies": [],
    "content": {
      "size": 0,
      "mimeType": "text/html"
    },
    "redirectURL": "",
    "headersSize": 32,
    "bodySize": 0
  },
  "cache": {},
  "timings": {
    "blocked": 0,
  }
},

HAR files can be exported from Chrome's Network analyser developer tool (ctrl-shift-i → Network tab → capture some requests → Right-click and select Save as HAR with contents. (Additional tip: Check the "Preserve Log on Navigation option – which looks like a recording button – to capture multi-level redirects and such)

As human-readable JSON is, it's still difficult to get a good overview of the requests. So I wrote a quick Python script that turns the JSON into something that's a little easier on our poor sysadmin's eyes:

harview_output

It supports colored output, dumping request headers and response headers and the body of POSTs and responses (although this will be very slow). You can filter out uninteresting requests such as images or CSS/JSS with the --filter-X options.

You can get it by cloning the Git repository from the Bitbucket repository.

Cheers!

bbcloner: create mirrors of your public and private Bitbucket Git repositories

 

bbclonerI wrote a small tool that assists in creating mirrors of your public and private Bitbucket Git repositories and wikis. It also synchronizes already existing mirrors. Initial mirror setup requires that you manually enter your username/password. Subsequent synchronization of mirrors is done using Deployment Keys.

You can download a tar.gz, a Debian/Ubuntu package or clone it from the Bitbucket page.

Features

  • Clone / mirror / backup public and private repositories and wikis.
  • No need to store your username and password to update clones.
  • Exclude repositories.
  • No need to run an SSH agent. Uses passwordless private Deployment Keys. (thus without write access to your repositories)

Usage

Here's how it works in short. Generate a passwordless SSH key:

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key: /home/fboender/.ssh/bbcloner_rsa<ENTER>
Enter passphrase (empty for no passphrase):<ENTER>
Enter same passphrase again: <ENTER>

You should add the generated public key to your repositories as a Deployment Key. The first time you use bbcloner, or whenever you've added new public or private repositories, you have to specify your username/password. BBcloner will retrieve a list of your repositories and create mirrors for any new repositories not yet mirrored:

$ bbcloner -n -u fboender /home/fboender/gitclones/
Password: 
Cloning new repositories
Cloning project_a
Cloning project_a wiki
Cloning project_b

Now you can update the mirrors without using a username/password:

$ bbcloner /home/fboender/gitclones/
Updating existing mirrors
Updating /home/fboender/gitclones/project_a.git
Updating /home/fboender/gitclones/project_a-wiki.git
Updating /home/fboender/gitclones/project_b.git

You can run the above from a cronjob. Specify the -s argument to prevent bbcloner from showing normal output.

The mirrors are full remote git repositories, which means you can clone them:

$ git clone /home/fboender/gitclones/project_a.git/
Cloning into project_a...
done.

Don't push changes to it, or the mirror won't be able to sync. Instead, point the remote origin to your Bitbucket repository:

$ git remote rm origin
$ git remote add origin git@bitbucket.org:fboender/project_a.git
$ git push
remote: bb/acl: fboender is allowed. accepted payload.

Get it

Here are ways of getting bbcloner:

More information

Fore more information, please see the Bitbucket repository.

MCPlayerEdit v0.21 released

I've released a new version of my Minecraft Player/World Editor MCPlayerEdit v0.21. This release brings MCPlayerEdit up to date with Minecraft v1.0, The following features and modifications have been added:

  • Lily Pad
  • Nether Brick, Nether Brick Fence, Nether Brick Stairs, Nether Wart [block]
  • Enchantment Table, Brewing Stand [block], Cauldron [block], Brewing Stand, Cauldron
  • End Portal, End Portal Frame, End Stone, Dragon Egg
  • Blaze Rod, Blaze Powder
  • Ghast Tear, Nether Wart
  • Gold Nugget
  • Potion, Glass Bottle, Spider Eye, Fermented Spider Eye
  • Magma Cream
  • Eye of Ender, Spawner Egg
  • Glistering Melon
  • Music Discs

Thanks to Pedro Lopes for the patch!

MCPlayerEdit v0.20 released

I've released a new version of my Minecraft Player/World Editor MCPlayerEdit v0.20. This release brings MCPlayerEdit up to date for the upcoming Minecraft Beta v1.8, The following features and modifications have been added:

  • Change player food (including god-mode)..
  • Switch between Creative and Survival.
  • Added Pine leaves, Birch leaves
  • Added (Double) Brick Slab, (Double) Stone Brick Slab, Stone With Silverfish, Stonebrick, Mossy Stonebrick (buggy), Cracked Stonebrick (buggy), Brick Stairs, Stone Brick Stairs
  • Added Huge Brown Mushroom (buggy), Huge Red Mushroom (buggy)
  • Added Iron Bars, Glass Pane, Vines, Fence Gate
  • Added Melon, Pumpkin Stem, Melon Stem, Melon Slice, Pumpkin Seeds, Melon Seeds, Raw Beef, Steak, Raw Chicken, Cooked Chicken, Rotten Flesh
  • Added Ender Pearl

You can get the new version Here.

gCountDown v1.0: Systray countdown timer for Linux

I've released v1.0 of the gCountDown program.

gCountDown is a very simple alarm countdown timer. It sits in your system tray where you can click it to set an alarm. Once the time runs out, you will be alerted.

This release adds the ability to play a sound when an alarm goes off pops up a menu on right-clicking the icon so you can quit the application and has some minor bugfixes. A Debian/Ubuntu package is now also available.

gCountDown: Systray countdown timer for Linux

I needed an easy way to set timers on my desktop PC. All I really want is to set a countdown in hours, minutes and seconds, and have it alert me when that time has elapsed. I couldn't find anything simple with some exceptions that wouldn't compile (anymore) due to missing libs (which weren't available in Xubuntu). So I whipped up my own.

You can download it from its home page, and here's a screenshot of the thing:

Additionally, I was quite amazed at how easy it is to write GUI applications using just GTK in combination with Glade. Writing this tool took me only about an hour, with no previous knowledge. All it really required was creating a GTK Status Icon with an active signal handler. The handler pops up an interface put together in Glade by loading the gcountdown.glade file using gtk.glade.XML(). Connecting signals to the widgets is also super easy with signal_autoconnect().

Take a look at the source code. It's only a measly 136 lines.

MCPlayerEdit v0.19 released

I've released a new version of my Minecraft Player/World Editor MCPlayerEdit v0.19. This release features the following modifications and additions:

  • Added a `health` command which lets you set the player health (also a god-mode)
  • Fixed a bug where only supplying an item ID to give/remove would not give the maximum stack size but would give a stack equal in size to the item ID specified.
  • Fixed a bug where adding non-safe items to the inventory would give a stack size of 0.

You can get the new version Here.