Skip to content

Instantly share code, notes, and snippets.

View eriols's full-sized avatar

Firmament eriols

  • Stockholm
View GitHub Profile
@eriols
eriols / copy_fixed_lines_to_dynamic.pl
Created October 6, 2013 17:33
copies fixed length delimited xml data in format "some text followed by xml" (originally from a mainframe data set) to a normal file, eg not fixed length
#!/usr/bin/perl
use strict;
use warnings;
use Carp;
sub usage {
print {*STDERR} "usage: read-from-file, copy-to-file\n";
exit 1;
}
@eriols
eriols / transpose.c
Created October 6, 2013 17:24
transposes a matrix
// gcc -pedantic -Wall -std=c99 transpose.c -o transpose
// c99 needed: non static aggregate initialization and decl in loop
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct
{
int rows;