Skip to content

Instantly share code, notes, and snippets.

View cprima's full-sized avatar

Christian Prior-Mamulyan cprima

  • Germany
View GitHub Profile
@cprima
cprima / README.md
Last active August 25, 2023 05:12
Turing Pi 2: On BMC host flash conveniently multiple CM4

init-nodes.sh

The init-nodes.sh script is a utility for the Turing Pi 2 to initialize and configure multiple CM4 nodes in a structured and automated manner. It operates by looping through specified node numbers, performing actions like copying configurations, power cycling, and more.

Prerequisites

  • Tested with BMC version 1.1.0 -- bug reports with older versions are welcome (see below).
  • The script requires sh.
  • It should be run with root permissions.
  • The image file to be flashed should be provided.
@cprima
cprima / _README.md
Last active May 11, 2022 12:33
Elastic Logstash Kibana UiPath Studio Community Execution.log local

UiPath Studio Execution.log ingestion to Elastic

UiPath Studio ─────► Filebeat ─────► Logstash ─────► Elastic ──────► kibana

This gist contains 4 config files for elastic, tested with version 8.2 on Windows.

  • elastic.yml: no modifications but prior to publishing I had set network.host: 127.0.0.1 to a proper IPv4 address
  • kibana.yml: no modifications
  • filebeat.yml: enabled the first input, set output to logstash, uncommented setup.kibana
  • logstash.yml: this is the major part of this gist:
@cprima
cprima / Code.gs
Last active October 27, 2021 05:09
German gas prices into Google Sheet by API
/**
* Automated download of gas station prices
* leveraging tankerkoenig.de API
*
* @author: Christian Prior-Mamulyan <[email protected]>
* @license: MIT
*
* depends on config file containing apikey, ids_csv, output_spreadsheetId, output_sheetname
*/
@cprima
cprima / README.md
Last active February 1, 2018 05:27
Scripted version of the Nitrokey-based EC CA from the article at https://medium.com/where-the-flamingcow-roams/ec-ca-redux-now-with-more-nitrokey-729061e1b7c9

Two versions:

  • make_ca-rsa.sh with RSA keys
  • make_ca-ec.sh with the original elliptic curve keys
@cprima
cprima / ProdMgt.svg
Last active January 28, 2018 12:31
Product Manager: What I do
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cprima
cprima / initializing-NitrokeyHSM.sh
Created January 1, 2018 17:18
Initializing the Nitrokey HSM (Ubuntu 16.04)
#!/usr/bin/env bash
#/**
# * A bash script to initialize a Nitrokey HSM in a basic way.
# * Does nothing on a Nitrokey HSM that was ever initialized before.
# * Its main purpose is to validate user input, especially the -so-pin.
# * I wrote it to make me read the docu carefully. ;)
# *
# * What the script does:
# * - uses readline with plain input, and not "enter twice and compare"
# * -- so "secret input" are visible on the screen
@cprima
cprima / srv-salt-vscode.sls
Last active December 25, 2016 08:51
Install Visual Studio Code on Ubuntu (Debian?) with Saltstack
install Visual Studio Code:
cmd.run:
- name: dpkg -i /tmp/code.deb
- unless: dpkg -s code
- require:
- file: /tmp/code.deb
#curl -I https://go.microsoft.com/fwlink/?LinkID=760868
#Location: https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable
/tmp/code.deb:
@cprima
cprima / An OpenWRT Chaos Calmer collectd custom exec script.md
Last active July 11, 2018 11:53
Scraping custom statistics from a Devolo Powerline adapter

Scraping custom statistics from a Devolo Powerline adapter

THAT moment when you realize that the webinterface of the access point in a Devolo dLAN® 1200+ Powerline gets updated via jQuery from a json file!

ab95b5b2-3dea-11e6-8598-294304c7cc01

curl 'http://10.xxx.yyy.zzz/cgi-bin/htmlmgr?_file=getjson&service=hpdevices'
[{"loc":"local","type":"hp200","name":"dLAN 1200+ WiFi ac","mac":"F4:06:ab:ab:ab:ab","tx":"","rx":"","ustr":"teh remote"},{"loc":"remote","type":"hp200","name":"dLAN 1200+","mac":"F4:06:aa:bb:cc:dd","tx":"85.3125","rx":"254.625","ustr":"teh master"},{}]