Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Compiling...

Mirza Krak mirzak

💭
Compiling...
View GitHub Profile
@mirzak
mirzak / mender-client.sh
Last active Apr 20, 2020
A fake Mender client implemented in bash
View mender-client.sh
#!/bin/bash
MENDER_SERVER_URL="https://hosted.mender.io"
MENDER_TENANT_TOKEN=""
MENDER_DEVICE_TYPE=""
# This variable is mutable
MENDER_ARTIFACT_NAME="release-v1"
function show_help() {
@mirzak
mirzak / create-mender-artifact.sh
Last active Dec 10, 2019
Qt Creator - Mender script
View create-mender-artifact.sh
#!/bin/bash
# A simple script
set -e
MENDER_SERVER_URL="https://docker.mender.io"
# NOTE! You need to provide your authentication set here that you are using in the Demo enviroment.
MENDER_SERVER_USER=""
@mirzak
mirzak / gist:ca0b5a622761beb3b97a483395ec9e47
Last active Dec 3, 2019
Testing disk write speed on embedded Linux devices (WARNING! USE WITH CARE! As it might overwrite your system partitions )
View gist:ca0b5a622761beb3b97a483395ec9e47
#!/bin/bash
# This script copies data synchronously from one block device to a second one.
#
# It will perform the same operation using multiple block sizes, which makes
# it easy to find the optimal one for the current device and configuration.
#
# WARNING!
#
# This will blindly write data to a partition and if not used with care, it
@mirzak
mirzak / gist:2f9a75278ddc99e990f2b2e82442f12a
Created Apr 10, 2019
Comparing architecture-specific information binary files of Debian (armv7) and Raspbian (armv6)
View gist:2f9a75278ddc99e990f2b2e82442f12a
# Recorded out of "readelf -A" of binary files, comparing Raspbian and Debian
# Raspbian file attributes
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "6"
Tag_CPU_arch: v6
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
View pdf-and-png-to-tiff.sh
#!/bin/sh
# Utility script that converts "PNG" and "PDF" files in to a single TIFF file
# with CCITT Group 4 (T.6) compression
#
# The input files are first converted to monochrome PBM files before they
# are converted to TIFF
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
View sdl-core patch
From dc329c9a115299bd507f3a495572e9a6704b5358 Mon Sep 17 00:00:00 2001
From: Mirza Krak <mirza.krak@northern.tech>
Date: Thu, 4 Oct 2018 14:32:37 +0000
Subject: [PATCH 1/1] a2dp_source_player_adapter: fix API reference to
GetDataOnSessionKey
Argument 4 should be of type *DeviceHandle and not *uint32_t
Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
View keybase.md

Keybase proof

I hereby claim:

  • I am mirzak on github.
  • I am mirzak (https://keybase.io/mirzak) on keybase.
  • I have a public key whose fingerprint is 4CB9 AC9E 6551 C691 0BCF 40DC BE39 4F4C 6B0B 0856

To claim this, I am signing this object:

View dwc2_register_dump
[ 0.960563] dwc2 ff540000.usb: mapped PA ff540000 to VA f0940000
[ 0.960699] dwc2 ff540000.usb: ff540000.usb supply vusb_d not found, using dummy regulator
[ 0.960942] dwc2 ff540000.usb: ff540000.usb supply vusb_a not found, using dummy regulator
[ 0.961165] dwc2 ff540000.usb: registering common handler for irq45
[ 0.961737] dwc2 ff540000.usb: Forcing mode to host
[ 1.031428] dwc2 ff540000.usb: Core Release: 3.10a (snpsid=4f54310a)
[ 1.031445] dwc2 ff540000.usb: Forcing mode to host
[ 1.101433] dwc2 ff540000.usb: DWC OTG HCD INIT
[ 1.101447] dwc2 ff540000.usb: hcfg=00000200
[ 1.101466] dwc2 ff540000.usb: dwc2_core_init(ee2a2018)
@mirzak
mirzak / gist:664a5b9ab215d8cb6d3cdceca9fa2eea
Created Nov 9, 2017
Convert image to ppm format suitable for Linux splashscreen
View gist:664a5b9ab215d8cb6d3cdceca9fa2eea
The logo_linux_clut224.ppm was generated in the following way
- open your desired splash screen image (bmp, jpeg, whateva) in GIMP
- File->Export As...
- Change the name to <image name>.ppm and save
- Choose "RAW" in the pop-up window that is showed
- Now we run the following comands
# This is to reduce color count to 224
ppmquant 224 <image name>.ppm > <image name>_224.ppm