Profile cover photo
Profile photo
Emil Nicolaie Perhinschi
82 followers
82 followers
About
Communities and Collections
View all
Posts

Post has attachment
**
getting tired of being victimized by overeager JS developers I am taking a hard look at Javascript/Node environment to keep it real and eat my own dog food I published some code on node https://www.npmjs.com/package/matrix-mab may the FSM have mercy of my d...
Add a comment...

Post has attachment

Post has attachment
dlang - retrieve struct from void pointer passed to extern (C) function
struct Data {
int depth;
}

extern (C) void startElement(void* userData, const(char)* name, const(char*)* atts) nothrow
{

Data user_data = (cast(Data) userData);
user_data.depth++;
// and so forth
Add a comment...

Post has attachment
count unique values in rows with bash, grep and awk
cat /some/file/path.txt | awk '{ print $5}' | uniq -c
Add a comment...

Post has attachment
backup sites with cront and ssh
# m h dom mon dow command 33 0 * * * /usr/bin/ssh root@lunch-break.ro "/bin/tar czf - /home/www/bla " > \
/home/emilper/backup/bla/www_bla_`date +\%Y-\%m-\%d_\%H-\%M-\%S`.tar.gz 2>>/tmp/cron.log
52 0 * * * /usr/bin/ssh root@lunch-break.ro "mysqldum...
Add a comment...

Post has attachment
perl compiled under 5 minutes with perlbrew on a Ryzen 7
emilper@home ~ $ time perlbrew install -j8 -Dusethreads -Duselargefiles -Dcccdlflags=-fPIC -Duse64bitint -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Doptimize=-O2 -Duseshrplib perl-5.20.3 Installing /home/emilper/perl5/perlb...
Add a comment...

Post has attachment

Post has attachment
upgraded to linux kernel 4.8
I upgraded my Linux Mint 18.1 to the 4.8 kernel and was left without network and sound. To fix that all I needed to do was to install the linux-image-extra, which I don't remember ever needing to install explicitly: sudo apt-get install linux-image-extra-4....
Add a comment...

Post has attachment
update on Gedit plugin to format JSON
what changed: $j->canonical([1]) - this will sort the keys in the json objects #!/usr/bin/env perl

use strict;
use JSON::XS;
local $/ = undef;
my $content = ;

my $j = JSON::XS->new->utf8->pretty(1);
$j->canonical([1]);
my $output = $j->encode($j->decode(...
Add a comment...

Post has attachment
Add a comment...
Wait while more posts are being loaded