Some tips for me and other


Python + generating images + text

Source: Install the library: sudo pip install pillow The code: #!/usr/bin/env python from PIL import Image, ImageDraw, ImageFont # Text positioning text_y = 100 text_pad = 45 # Define fonts for regular text and heading data_font = ImageFont.truetype(“Roboto-Regular.ttf”, 32) header_font = ImageFont.truetype(“Roboto-Bold.ttf”, 50) # Load background image bg_img =“bg_img.png”) surface = ImageDraw.Draw(bg_img) # […]

Supermicro IPMI + Reset password

If you have physical access to the server, follow these simple steps to reset the ADMIN password on your IPMI: Create a bootable DOS USB stick using. Download the latest IPMICFG utility released by Supermicro. Extract the archive and copy the contents of the ‘DOS’ folder on to your bootable DOS USB. Boot your server […]

Skype for Business tricks

Add ?SL= at the end of the URL and give the meeting link to the external user(s). By adding ?SL= to the URL, the external user will be forced to use the Skype for Business Web App. Source:

Powershell + Get users from specified groups

$Groups = “ip”,”team”,”Managment”,”mott” ForEach ($Group in $Groups) { write-host “#” write-host “Group:” $Group write-host “===============================” $gr = Get-ADGroupMember -identity $group echo $ write-host “===============================” }

Gitlab + Change the notification for new users

Edit the following files: /opt/gitlab/embedded/service/gitlab-rails/app/views/notify new_user_email.text.erb new_user_email.html.haml Then run gitlab-ctl reconfigure

My Interactive Environment Monitoring System (IEMS)

I built IEMS for our office with sensors DS1820B and cables for ethernet (current cable system inside walls) – looks like: We monitor temperature for all the rooms and CO2, humidity, temperature from Netatmo weather station. We’re going to upgrade the sensors to DHT22 to monitor humidity also. I use Html + Google charts + […]

RRDTools + fine design

#!/bin/sh /usr/local/bin/rrdtool graph /usr/local/www/apache22/data/images/netatmo0.png \ –width 400 –height 150 –font TITLE:13 –color BACK#444444 –color SHADEA#444444 –color SHADEB#444444 –color CANVAS#444444 –color FONT#ff7518 –slope-mode –start -1d –end now –units-exponent 0 –vertical-label “ppm” –title “CO2 from Netatmo” –imgformat PNG \ DEF:n0=/var/rrdtool/db/netatmo.rrd:n0:AVERAGE \ LINE1:n0#00ff00:”CO2″ \ VDEF:sn0=n0,AVERAGE \ CDEF:tp_17=n0,0,GT,n0,1700,GT,1700,n0,IF,0,IF AREA:tp_17#29206D \ CDEF:tp_16=n0,0,GT,n0,1600,GT,1600,n0,IF,0,IF AREA:tp_16#29106D \ CDEF:tp_15=n0,0,GT,n0,1500,GT,1500,n0,IF,0,IF AREA:tp_15#28006D \ CDEF:tp_14=n0,0,GT,n0,1400,GT,1400,n0,IF,0,IF AREA:tp_14#28106D \ […]

JMX for Tomcat and Zabbix

Edit registry for each node: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\node1\Parameters\Java

Replace or add a file into MSI The command extracts the MSI files: msi2xml -c OutputDir your.msi Open OutputDir and modify the file. To rebuild the MSI run: xml2msi.exe -m yourmsi.xml  

PFX to key and crt in PEM

Extract Private Key: The following command will extract private key from .pfx file. You can find the private key in file named private_key.pem. # openssl pkcs12 -in myfile.pfx -nocerts -out private_key.pem -nodes   Enter Import Password: MAC verified OK Extract Certificate: The following command will extract certificate from .pfx file. You can find the certificate […]

Previous Posts