dracoblue.net

Generating/Parsing csv files with craur

In the previous blog post we looked at parsing/generating xml with craur.

Today we'll check, how you can parse csv (even xlsx) files with craur. Craur is a json/xml/csv/xlsx to json/xml/csv/xlsx conversion library.

Usually you might use fgetcsv or some custom code to parse csv, but with craur we have a a simple api for any of those formats, with a consistent api when it comes to throwing exception.

Continue reading ...

In craur, csv, open source, php by DracoBlue @ 09 Dec 2013 | 443 Words

Generating/Parsing a sitemap.xml with craur

Some of you might have heard or used my json/xml/csv/xlsx to json/xml/csv/xlsx conversion library called craur.

It advocates a simple api for any of those formats, instead of simplexmlloadstring or other php built in functions, which are usually not consistent when it comes to throwing exceptions or warnings.

Today we'll look into an example, how to use craur to generate and parse a sitemap.xml.

Continue reading ...

In craur, open source, php, xml by DracoBlue @ 08 Dec 2013 | 621 Words

Updating Puppet Modules in Vagrant Boxes

If you are working with vagrant machines and provision those machines with puppet, you will find plenty of good modules at puppetforge and of course at github.

But in both cases you will download a specific version of the module and clone it into a directory called modules.

# e.g. for stdlib and nginx module
modules\
  nginx
  stdlib
Continue reading ...

In apt-get, git, open source, puppet, ubuntu, vagrant by DracoBlue @ 07 Dec 2013 | 697 Words

PowerShell Community Extensions in Vagrant for Windows

Setting up windows machines with vagrant, is pretty good supported. To have less problems, you might want to use vagrant-windows plugin.

Since the windows version relies on Microsoft's PowerShell, you usually want to use the PowerShell Community Extensions.

To ensure that those are installed, you have to provision this package by using for instance puppet.

But, since pscx is only available as .zip-File, we need to install 7-Zip in first place.

Continue reading ...

In powershell, puppet, vagrant, windows by DracoBlue @ 06 Dec 2013 | 352 Words

SHOW TABLES in sqlite/postgresql

When working on craur's pdo functionalities, I wanted to know all tables in a specific pdo database.

If you are using mysql, you can use

SHOW TABLES;

to retrieve a list of all available tables in the current database.

But this does not work in postgres nor in sqlite.

Continue reading ...

In postgresql, sqlite by DracoBlue @ 05 Dec 2013 | 152 Words

Page 9 - Page 10 - Page 11

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About