I currently use rst2pdf to create presentations slide decks from reStructured Text files. I like rST a lot as it's more expressive than Markdown and allows for extension. Tables in rST are marked up like this:
| Heading 1 | Heading 2 | Heading 3 |
| a | b | c |
| | | |
| aa | | |
| d | e | f |
| g | h | i |
| j | k | l |
We create a PDF file with the command rst2pdf test.rst which produces a table that looks like this: To style, this we create styles within a style file and then compile using rst2pdf test.rst -s my.style. Let's start… continue reading.
I'm still using Ansible to provision Vagrant VMs. This is how I added the XHGui profiler to my standard setup. Theres a number steps we need to do: Install Composer Install the uprofiler PHP extension Install XHGui Set up for profiling Set up host for XHGui website Install Composer Installing Composer requires these tasks:
- name: Install Composer
shell: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin creates=/usr/local/bin/composer
- name: Rename composer.phar to composer
shell: mv /usr/local/bin/composer.phar /usr/local/bin/composer creates=/usr/local/bin/composer
- name: Make composer executable
file: path=/usr/local/bin/composer mode=a+x state=file
- name: Create global composer directory
file: path=/usr/local/composer state=directory mode=0775
Firstly we download the Composer installer and run it to create composer.phar. We then rename to composer, make executable and… continue reading.
Rather helpfully, David Goodwin left a comment about how he shortens the space taken up by the directory section of his terminal's PS1 prompt by using a Bash script to remove the middle portion. This is a really good idea, so I ported it into my PS1 set up which resulted in some rearranging and thought I'd share here as I modified for OS X and I don't want to lose it! The relevant portion… continue reading.
I use many tabs in a Terminal window quite frequently, and while the window title will show the current directory name, the tab title doesn't. You can manually change it using shift+cmd+i, but who can be bothered? Automating it so that the tab title always matches the current directory turns out to be really easy and just requires a few lines in ~/.profile. Firstly, we need a function that sets the tab's title to the… continue reading.
I regularly deal projects that target SQL Server, but mostly develop against MySQL to avoid having to run a full Windows stack locally all the time. One of the nice things about PHP with DBAL and Migrations is that the database is pretty well abstracted from my code. Of course, this means that I don't target any of the specialist features, but for these projects, this hasn't been an issue. To convert data from SQL… continue reading.
I use rst2pdf to create my presentations and noticed that the syntax highlighter wasn't highlighting instanceof. rst2pdf uses pygments for syntax highlighting, so I wondered what was going on. A short investigation led to me realise that the current stable version of pigments is 1.6 and they are working on 2.0. It seems that 2.0 has a number of changes to the PHP lexer, which aren't in 1.6. While I'm waiting, I modified my local… continue reading.
I've just upgraded to Vagrant version 1.6, and vagrant global-status is possibly my favourite new feature. This command lists all currently up Vagrant environments wherever they may be on your computer:
$ vagrant global-status
id name provider state directory
dbc7770 joindin virtualbox running /Users/rob/www/thirdparty/joindin-vm
0683c7a default virtualbox running /Users/rob/www/thirdparty/joindin-zs7
The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"
As you can see by the helpful information message, you can then pass the id to any of the usual Vagrant commands in order to work with that Vagrant install rather than changing directory first. I tend to use this to halt VMs… continue reading.
I see that Zend Server 7 has now been released. I've been running the beta for all my development work for a while now and the main reason is the new Z-Ray feature. Z-Ray is a bar that is injected into the bottom of your page showing lots of useful information. This is what it looks like in its closed state when run on my development version of joind.in: At a glance, I can see… continue reading.
One project that I'm currently working on is an internal business application that's using stock Bootstrap 3. I needed a searchable select box and Chosen fitted the bill, so I'm using that. However, the default styles for the Chosen select box differ slightly from Bootstrap. The most noticeable being the height of the control.
I'm currently writing a project in Perl for a client and have discovered that the default Perl syntax highlighting in Sublime Text is terrible. Fortunately, the community has stepped up and Blaise Roth has created the ModerlPerl package. Install via Package Control. To get all Perl files to open with the new syntax highlighter, use View > Syntax > Open all with current extension as… and select ModernPerl from the sub-menu.