Skip to content

Instantly share code, notes, and snippets.

View Torstein-Eide's full-sized avatar

Torstein Eide Torstein-Eide

View GitHub Profile
import time, keyboard # using module keyboard
A = 0
q = False
w = False
komfeil = 2
while True: # making a loop
time.sleep(0.1)
try: # used try so that if user pressed other than the given key error will not be shown
## Forbindelse feil blokkert
@Torstein-Eide
Torstein-Eide / PVE-HP-ssacli-smart-storage-admin.md
Created October 5, 2020 13:53 — forked from mrpeardotnet/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@Torstein-Eide
Torstein-Eide / PVE-HP-ssacli-smart-storage-admin.md
Created October 5, 2020 13:53 — forked from mrpeardotnet/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@Torstein-Eide
Torstein-Eide / backup
Created May 12, 2020 15:17
Incremental backup to external drive using snapper and btrfs send/receive
#!/bin/bash
# James W. Barnett
# Takes snapshots of each snapper configuration. It then sends the snapshot to
# a location on an external drive. After the initial transfer, it does
# incremental snapshots on later calls. It's important not to delete the
# snapshot created on your system since that will be used to determine the
# difference for the next incremental snapshot.
# Can set the backup directory here, or in the snapper configuration file with
#!/usr/bin/env python3
#
# Dumb script to dump (some) of bcache status
# Copyright 2013 Darrick J. Wong. All rights reserved.
#
# This file is part of Bcache. Bcache is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@Torstein-Eide
Torstein-Eide / korenix-mibs.tar.xz
Last active February 3, 2020 11:53
Observium Korenix definisjon
@Torstein-Eide
Torstein-Eide / definitions_models.inc.php
Last active January 23, 2020 11:35
Observium Cisco IE 1000 support
$model = "cisco-IE1000";
$config['model'][$model] = array(
'.1.3.6.1.4.1.9.1.2330' => array('name' => 'IE-1000-4T1T-LM'),
'.1.3.6.1.4.1.9.1.2331' => array('name' => 'IE-1000-6T2T-LM'),
'.1.3.6.1.4.1.9.1.2332' => array('name' => 'IE-1000-4T2S-LM'),
'.1.3.6.1.4.1.9.1.2333' => array('name' => 'IE-1000-8P2S-LM'),
);
SP=$PWD
for A in `ls -d $PWD/*`; do
cd $A
rename-video.sh
done
cd $SP
@Torstein-Eide
Torstein-Eide / btrfs-scrub-volum1
Created October 20, 2019 21:08 — forked from ricco386/btrfs-scrub-pictures
Systemd timer for BTRFS Scrub. Usage: systemctl enable [email protected]
# /etc/btrfs.d/btrfs-scrub-volum1
mountpoint=/volum1
@Torstein-Eide
Torstein-Eide / gist:b27ecf6e159463fe7705a102fb84ed53
Created October 10, 2019 19:20
Observium database view and edit.
## velg database
# use observium
## list kollonner
# DESC `devices`;
## finn brukte verdier, i 'disable'
#SELECT DISTINCT `disabled` FROM `devices`;
## finn alle som er diablet.