Skip to content

Instantly share code, notes, and snippets.

Avatar

Michal Jurosz mj41

View GitHub Profile
@mj41
mj41 / adb-screenshot.sh
Last active Oct 13, 2019
Fast ADB screenshot helper script
View adb-screenshot.sh
#!/bin/bash
set -e
set -x
SCR_FPATH="$1"
[ -z "$1" ] && echo "Missing file basename." && exit 1
[ ! -z "$2" ] && ADBDEV="$2"
[ -z "$ADBDEV"] && ADBDEV=`adb devices | grep -v 'List of' | perl -n0e '/(\S+)/; print $1'`
@mj41
mj41 / pgdockerx.sh
Last active Apr 10, 2016
Postgres inside Docker Xtimes benchmark
View pgdockerx.sh
#!/bin/bash
# Pull Docker image
# docker pull postgres
# For more info see
# https://hub.docker.com/_/postgres/
# cleanup
# docker rm --volumes -f pg-server-1 pg-server-2 pg-server-3 pg-server-4 pg-server-5 pg-server-6 pg-server-7 pg-server-8 pg-client-1 pg-client-2 pg-client-3 pg-client-4 pg-client-5 pg-client-6 pg-client-7 pg-client-8; docker ps -a
View 0 threading benchmarks - 1-cpuinfo.txt
~/gd/dalsi/nanoparrot/threading [master|✔]$ cat /proc/cpuinfo | head -n26
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 69
model name : Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
stepping : 1
microcode : 0x1c
cpu MHz : 2483.894
cache size : 4096 KB
@mj41
mj41 / gist:2731bd8258052ed5439c
Last active Jul 3, 2017
go-loop.sh - perl6 vs. perl5 time -v
View gist:2731bd8258052ed5439c
perl (Perl 5) version:
This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux-thread-multi
perl6 (Perl 6) version:
This is Rakudo version 2017.06-133-ga7b2304 built on MoarVM version 2017.06-35-g3d3d0d0
implementing Perl 6.c.
perl 5 - simple int loop: ok
Command being timed: "perl -e my $i = 0; while (($i = $i + 1) <= 100000000) { }; print "ok\n";"
User time (seconds): 4.17
You can’t perform that action at this time.