Some tips for me and other


Cisco getting DHCP slow issue

You can use the Interface range command: interface range fa0/1 – 24 spanning-tree portfast Be careful that no switches are connected to ports within the range.

System power report

powercfg /systempowerreport

Extend LVM partition in CentOS 7/8 under VmWare

Add more space on the disk in VmWare console. Run cfdisk and check that you see free space after /dev/sda5. In my case there are /dev/sda4 as extended partition and /dev/sda5 as LVM2 partition in extended. Remember start sectors for /dev/sda4 and sda5. Delete /dev/sda5. Don’t worry – your data will be OK. Delete /dev/sda4. […]

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 \ […]

Previous Posts Next posts