Skip to content

Instantly share code, notes, and snippets.

View Markomas's full-sized avatar
🏸
Focusing

Markomas

🏸
Focusing
View GitHub Profile
<?php
$url = 'http://' . trim($_SERVER['REQUEST_URI'], '/');
if(strpos($url, '.m3u') !== false) {
$playlist = file_get_contents($url);
print str_replace('http://', 'http://my.domain.lt/', $playlist);
die();
}
#!/bin/bash
#################################
# Config #
#################################
#Search this paths
PATHS=( "/movies" )
#Your TheMovieDB API
@Markomas
Markomas / PVE-HP-ssacli-smart-storage-admin.md
Created December 14, 2021 20:48 — forked from Philhil/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

@Markomas
Markomas / gist:d53d83718aef78b92562fe88c4f6d533
Created September 21, 2021 10:50
HPE change bios settings via bash
conrep -s -f original.dat
conrep -l -f original.dat
<Conrep>
<global>
<helptext><![CDATA[
This is the input file for CONREP describing the
configurable settings for the ProLiant servers listed below.
Other models require platform specific configuration files that are available
@Markomas
Markomas / smartd-telegram-notify.md
Created January 20, 2021 00:56 — forked from te-online/smartd-telegram-notify.md
How to make smartmontools send errors to you via Telegram messenger.

###Step by step

Installing smartmontools

  1. Install smartmontools with sudo apt-get install smartmontools

Create your new bot

  1. Create a new telegram bot via the botfather (see https://core.telegram.org/bots#3-how-do-i-create-a-bot). You will need the token of the bot from botfather.
  2. Initiate a chat with your new bot.
  3. Send a GET to https://api.telegram.org/bot{YOUR_TOKEN}/getUpdates.
#!/usr/bin/env bash
#Simple command to freeze all CT's in proxmox
ct_list() {
pct list | sed 's/|/ /' | awk 'NR>1 {print $1}'
}
CT_ID=($(ct_list))
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMhoR8zPXz3r/sZ0qmoglz3JZQ5veclw20OxUQAn8/er3ZXt7jQcxZzYQJCHK5QkbmJPikkmUdaxEhwRDAeq3L3ACJm3k/+jvNIoEDQwKkd4wG28hOdtZvjgKBySsuHyxDAzJTxkjhkgEUbalkKHosPsZu0SYcESP0TZyExElBOvmc1Wel7i/CCt20UNpfHOxyIXdiAKzPF7qP1uC2jJwxuZkauJQZH7VMe+hjfCN2OSMzV/LpdfYsqLqK5WhmUkXOsGzb+Rf/fESF9sZLjcxXoYgxFWvLUGlm8loGXaKhdOLhWjtGz7RYcOtUFQkOx8lFkD3t9yXE6JJQKWh1rcNV df:f2:aa:a7:98:ad:0b:3b:7e:8d:90:90:34:f3:3a:65 markom@Medeina
@Markomas
Markomas / README.md
Created October 23, 2020 09:14 — forked from jbuncle/README.md
PHP Script to upload/push a composer project to a Nexus Repository Manager (that supports composer).

Composer Nexus Upload/Push

Quick Usage

php <(curl -s https://gist.githubusercontent.com/jbuncle/8e479343cfeb785046e3c6fe1a73dcce/raw/nexus-upload.php) \
         --repository=https://example.nexus.repo.com/repository/composer-repo/ \
         --username=publisher-user \
         --password=$NEXUS_PASS \
         --version=$CI_COMMIT_TAG
@Markomas
Markomas / PVE-HP-ssacli-smart-storage-admin.md
Created July 12, 2020 18:18 — 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

@Markomas
Markomas / run.sh
Last active July 9, 2020 11:27
LAMP setup
sudo apt update
sudo apt upgrade -y
sudo apt -y install lsb-release apt-transport-https ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt -y install php7.4
sudo apt -y install nginx mariadb-server php php-fpm php-common php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-bcmath php-soap php-ldap php-imap php-xml php-cli php-zip git unzip wget -y