Skip to content

Instantly share code, notes, and snippets.

View rroethof's full-sized avatar

Ronny Roethof rroethof

View GitHub Profile
@rroethof
rroethof / instances.php
Created January 1, 2021 10:03
app/Http/Livewire/instances.php
<?php
namespace App\Http\Livewire;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Collection;
use Livewire\Component;
use Corsinvest\ProxmoxVE\Api\PveClient;
use Illuminate\Http\Request;
use Telegram;
<!-- Navigation Links -->
<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
<x-jet-nav-link href="/" :active="request()->routeIs('dashboard')">
Dashboard
</x-jet-nav-link>
</div>
<div class="relative hidden space-x-8 sm:-my-px sm:ml-10 sm:flex" x-data="{ open: false }" @click.away="open = false" @close.stop="open = false">
<button x-on:click="open = true" type="button" class="text-gray-500 group inline-flex items-center space-x-2 text-base leading-6 hover:text-gray-900 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150">
<span>HEADER</span>
#!/bin/bash
# This script installs WordPress from Command Line.
#Colors settings
BLUE='\033[0;34m'
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

Keybase proof

I hereby claim:

  • I am rroethof on github.
  • I am rroethof (https://keybase.io/rroethof) on keybase.
  • I have a public key ASAPk4nKX6ZKHmJ6Tn3PakGsFzuiaqJI7PKiUSXNbrYIyAo

To claim this, I am signing this object:

@rroethof
rroethof / gist:9bbdc75c57d16b66a32c19675e901db8
Created August 10, 2019 12:58
python repeat last telegram messages
import json
import requests
TOKEN = "xx"
URL = "https://api.telegram.org/bot{}/".format(TOKEN)
def get_url(url):
response = requests.get(url)
content = response.content.decode("utf8")
return content
@rroethof
rroethof / 20-sysinfo
Last active May 7, 2021 18:43
mediabox-docker
#!/bin/bash
# /etc/update-motd.d/20-sysinfo
# get load averages
IFS=" " read LOAD1 LOAD5 LOAD15 <<<$(cat /proc/loadavg | awk '{ print $1,$2,$3 }')
# get free memory
IFS=" " read USED FREE TOTAL <<<$(free -htm | grep "Mem" | awk {'print $3,$4,$2'})
# get processes
PROCESS=`ps -eo user=|sort|uniq -c | awk '{ print $2 " " $1 }'`
PROCESS_ALL=`echo "$PROCESS"| awk {'print $2'} | awk '{ SUM += $1} END { print SUM }'`
@rroethof
rroethof / keybase.md
Created December 15, 2018 08:35
keybase.md

Keybase proof

I hereby claim:

  • I am rroethof on github.
  • I am rroethof (https://keybase.io/rroethof) on keybase.
  • I have a public key ASDgC6Q3FOhkEMfxmxKJiHJ_dYH25VvDspzts1OEtHw0cAo

To claim this, I am signing this object:

[{"name":"Users","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"username","type":"string","length":"64","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":true,"visible":false,"hidden":false,"colid":"c220","order":0}],"relation":[],"seeding":[]}]
# Installs a FreeBSD server
#
# Playbook Ver. 1.1
#
# This playbook will setup a freshly installed FreeBSD server as a ZFS enabled
# server which can be used in the backup server pool.
#
#
# CHANGES:
#