Skip to content

Instantly share code, notes, and snippets.

View dpavlin's full-sized avatar

Dobrica Pavlinušić dpavlin

View GitHub Profile
@dpavlin
dpavlin / openssl-speed-aes.txt
Created April 6, 2016 21:49
openssl speed aes
root@pine64:~# uname -a
Linux pine64 3.10.65-4-pine64-longsleep #16 SMP PREEMPT Sun Apr 3 10:56:40 CEST 2016 aarch64 GNU/Linux
root@pine64:~# openssl speed aes
Doing aes-128 cbc for 3s on 16 size blocks: 4984555 aes-128 cbc's in 2.95s
Doing aes-128 cbc for 3s on 64 size blocks: 2269135 aes-128 cbc's in 2.91s
Doing aes-128 cbc for 3s on 256 size blocks: 590071 aes-128 cbc's in 2.96s
Doing aes-128 cbc for 3s on 1024 size blocks: 148964 aes-128 cbc's in 2.95s
Doing aes-128 cbc for 3s on 8192 size blocks: 18671 aes-128 cbc's in 2.95s
Doing aes-192 cbc for 3s on 16 size blocks: 7192646 aes-192 cbc's in 2.95s
Doing aes-192 cbc for 3s on 64 size blocks: 1981523 aes-192 cbc's in 2.95s
@dpavlin
dpavlin / sshfs.sh
Created February 1, 2016 16:45
create command to copy/paste into local termnial to cd into sshfs mounted directory
#!/bin/sh -xe
# create command to copy/paste into local termnial to cd into sshfs mounted directory
echo "test -d /mnt/`hostname -s` || mkdir /mnt/`hostname -s` && df -t fuse.sshfs /mnt/`hostname -s` || sshfs `hostname -f`:/ /mnt/`hostname -s`/ && cd /mnt/`hostname -s`/`pwd`/"
@dpavlin
dpavlin / cheali-scope.sh
Last active February 2, 2016 21:29
Convert cheali charger logview output into tab seperated values in clipboard for easy copy/paste into spreadsheet
#!/bin/sh -xe
# .i3/config
# for_window[title="^Gnuplot"] floating enable
# http://users.softlab.ntua.gr/~ttsiod/gnuplotStreaming.html
test -x driveGnuPlots.pl || wget http://users.softlab.ntua.gr/~ttsiod/driveGnuPlots.pl && chmod 755 driveGnuPlots.pl
width=600
file=$1
@dpavlin
dpavlin / mount-rpi-image.sh
Last active December 20, 2023 18:21
mount Raspberry Pi image, copy qemu-arm-static and chroot into it to tweak it
#!/bin/sh -xe
# mount Raspberry Pi image, copy qemu-arm-static and chroot into it to tweak it
dir=/tmp/rpi
test "umount" = "$1" && sudo umount $dir/boot && sudo umount $dir
image=$1
test -r "$image" || ( echo "Usage: $0 /path/to/rpi.img" && exit 1 )
#!/usr/bin/perl
# http://www.regos.hr/UserDocsImages/KONTROLA%20OIB-a.pdf
my $oib = 69435151530;
my ($nr,$ck) = ( substr($oib,0,10), substr($oib,-1,1) );
print "$oib -> $nr $ck\n";
@dpavlin
dpavlin / keybase.md
Created September 22, 2014 22:00
keybase.md

Keybase proof

I hereby claim:

  • I am dpavlin on github.
  • I am dpavlin (https://keybase.io/dpavlin) on keybase.
  • I have a public key whose fingerprint is 7CC8 934E 8AEA AAF0 231D 90B9 C97F AD45 059A 34B6

To claim this, I am signing this object:

@dpavlin
dpavlin / DSLogic.Debian-sid-compile-fix.diff
Created January 10, 2014 18:10
quick fix to compile DSLogic-gui on Debian sid
commit 6e45af595937ed9a91d97f2490278844516bde3d
Author: Dobrica Pavlinusic <dpavlin@rot13.org>
Date: Fri Jan 10 19:07:11 2014 +0100
git compile on Debian sid fix
diff --git a/DSLogic-gui/CMakeLists.txt b/DSLogic-gui/CMakeLists.txt
index 5a4fb8f..748f2f0 100644
--- a/DSLogic-gui/CMakeLists.txt
+++ b/DSLogic-gui/CMakeLists.txt
@dpavlin
dpavlin / .xbindkeysrc
Created December 14, 2013 22:04
Example configuration for xbindkeys XF86* events
#b-
"xbacklight -inc 5"
m:0x0 + c:233
XF86MonBrightnessUp
#b+
"xbacklight -dec 5"
m:0x0 + c:232
XF86MonBrightnessDown
@dpavlin
dpavlin / thomson-download.pl
Created December 8, 2013 23:24
Download Thomson master journal list
#!/usr/bin/perl
use warnings;
use strict;
use Mojo::UserAgent;
use Mojo::DOM;
my $ua = Mojo::UserAgent->new;
my @selection = qw( H Y B K D SS );
@dpavlin
dpavlin / mchck-ezPort-buspirate.txt
Last active August 24, 2017 22:29
mchck buspirate SPI try to enter ezPort mode (non-working at the moment) moved to wiki at https://github.com/mchck/mchck/wiki/ezPort
newest version of this gist is part of wiki at https://github.com/mchck/mchck/wiki/ezPort
ezPort setup for flasing rig is deescibed at https://mchck.org/blog/2013-09-12-mc_hck_flashing_rig
pinout from updated https://github.com/mchck/mchck/wiki/Pinout
MCU pinput source http://cache.freescale.com/files/32bit/doc/data_sheet/K20P48M50SF0.pdf
ezPort description, chapter 29, http://cache.freescale.com/files/32bit/doc/ref_manual/K20P48M50SF0RM.pdf
MCU MCHCK ezPort