Skip to content

Instantly share code, notes, and snippets.

View yoe's full-sized avatar
🏠
Working from home

Wouter Verhelst yoe

🏠
Working from home
View GitHub Profile
@yoe
yoe / stats.pl
Last active January 17, 2021 09:35
SReview statistics generator
#!/usr/bin/perl -w
use strict;
use warnings;
use feature "say";
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new(timeout => 10);
$ua->proxy->detect;
@yoe
yoe / apdusender.c
Last active October 9, 2018 15:30
tool to quickly send some APDUs to a smartcard using PC/SC
#include <stdio.h>
#include <PCSC/winscard.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <getopt.h>
const struct option options[] = {
{"reader", required_argument, 0, 'r'},
{"apdu", required_argument, 0, 'a'},
#include <stdio.h>
#include <string.h>
#define sub int
#define eq ==
#define my$i int v$i
#define foreach$i(a) for(int v$i=0; v$i!=0; v$i++)
#define v$data data
#define foreach$j(a,b) for(int j=0; j<strlen(data[v$i]); j++)
#define v$j data[v$i][j]
#define use
@yoe
yoe / export_gridengine
Last active February 27, 2018 10:49
script to read the gridengine accounting file and parse the qstat output into a prometheus stat
#!/usr/bin/perl -w
use strict;
use warnings;
use Scalar::Util qw(looks_like_number);
open FH, '</opt/sge/default/common/accounting';
my @fields = ('qname', 'hostname', 'group', 'owner', 'job_name', 'job_number', 'account', 'priority', 'submission_time', 'start_time', 'end_time', 'failed', 'exit_status', 'ru_wallclock', 'ru_utime', 'ru_stime', 'ru_maxrss', 'ru_ixrss', 'ru_ismrss', 'ru_idrss', 'ru_isrss', 'ru_minflt', 'ru_majflt', 'ru_nswap', 'ru_inblock', 'ru_oublock', 'ru_msgsnd', 'ru_msgrcv', 'ru_nsignals', 'ru_nvcsw', 'ru_nivcsw', 'project', 'department', 'granted_pe', 'slots', 'task_number', 'cpu', 'mem', 'io', 'category', 'iow', 'pe_taskid', 'maxvmem', 'arid', 'ar_sub_time');

Keybase proof

I hereby claim:

To claim this, I am signing this object: