Skip to content

Instantly share code, notes, and snippets.

Eleni Maria Stea hikiko

Block or report user

Report or block hikiko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hikiko
hikiko / check-mesa-diff.pl
Last active Mar 19, 2018
A script that checks if a mesa patch indentation uses 3 spaces and no tabs. Run it with: ./check-mesa-diff.pl <patch-filename>
View check-mesa-diff.pl
#!/usr/bin/perl
use strict;
use warnings;
use Term::ANSIColor;
local $Term::ANSIColor::AUTOLOCAL = 1;
my $fname = $ARGV[0];
if(not defined $fname) {
@hikiko
hikiko / bin-to-c.c
Last active Nov 11, 2018
creates unsigned char array from bin data
View bin-to-c.c
#include <stdio.h>
int main(int argc, char **argv)
{
FILE *fp;
int cur, c, prevc;
if(argc < 2) {
fprintf(stderr, "You should provide a filename.\n");
return 1;
@hikiko
hikiko / cubemap-dump-in-order.pl
Last active Dec 6, 2018
dumped cubemaps in order (perl script)
View cubemap-dump-in-order.pl
#!/usr/bin/perl
use strict;
use warnings;
use IPC::System::Simple qw(capture);
my %cubefaces = (
astc10_rgba => ["astc10-rgba.cube1", "astc10-rgba.cube2", "astc10-rgba.cube3", "astc10-rgba.cube4", "astc10-rgba.cube5", "astc10-rgba.cube6"],
astc10_srgba => ["astc10-srgba.cube1", "astc10-srgba.cube2", "astc10-srgba.cube3", "astc10-srgba.cube4", "astc10-srgba.cube5", "astc10-srgba.cube6"],
@hikiko
hikiko / uncompressed.pl
Last active Dec 14, 2018
only prints an array with the 6 8x8 cube faces colors to paste in my .h file
View uncompressed.pl
#!/usr/bin/perl
use strict;
use warnings;
my $string = "unsigned char pixels[] = {";
my %facecolors = (
a => "255, 0, 0",
b => "0, 0, 255",
@hikiko
hikiko / side-by-side-diff.pl
Last active Jan 17, 2019
a script I use with claws-mail: https://bit.ly/2JJs5ql
View side-by-side-diff.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Copy qw(copy);
#use X11::Protocol;
my $fname = $ARGV[0];
if(not defined $fname) {
die "No input\n";
}
@hikiko
hikiko / minandmax.pl
Created Jan 24, 2019
reads v x y z values from obj (supposing 1 model) to find the bounding sphere radius
View minandmax.pl
#!/usr/bin/perl
use strict;
use warnings;
use POSIX;
use List::Util qw[min max];
my $fname = $ARGV[0];
if(not defined $fname) {
die "You must set the vectors filename.\n";
@hikiko
hikiko / ext_snippets.pl
Last active Mar 16, 2019
greps the extension related code snippets from Vulkan-Docs (ifdef VK_EXT_... to #endif)
View ext_snippets.pl
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
my $dir;
my $extname;
my $help;
@hikiko
hikiko / thumbs.pl
Last active Mar 16, 2019
old script - supposed to create thumbs from images and thumbs.html file (not tested recently)
View thumbs.pl
#!/usr/bin/perl
use strict;
use File::Path qw(rmtree);
use File::Copy;
use File::MimeInfo;
use Image::Magick;
my @files;
@hikiko
hikiko / greeklish.pl
Last active Mar 16, 2019
old script - not tested recently - convert greek to latin fnames (?)
View greeklish.pl
#!/usr/bin/perl
use strict;
use Encode;
use File::Copy;
my $dir;
my @files;
my $file;
my $initfile;
@hikiko
hikiko / report-validator.pl
Last active Apr 11, 2019
parses a csv with info on projects and hours and counts the hours that correspond to each project
View report-validator.pl
use strict;
use warnings;
use Getopt::Long;
my $report;
my $help;
GetOptions("r=s", => \$report,
"h" => \$help);
You can’t perform that action at this time.