Skip to content

Instantly share code, notes, and snippets.

View kinrokinro's full-sized avatar
🎯
Focusing

0xAN kinrokinro

🎯
Focusing
View GitHub Profile
@pcolby
pcolby / cpu.sh
Created September 14, 2013 04:29
Calculating CPU Usage from /proc/stat
#!/bin/bash
# by Paul Colby (http://colby.id.au), no rights reserved ;)
PREV_TOTAL=0
PREV_IDLE=0
while true; do
CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
unset CPU[0] # Discard the "cpu" prefix.
IDLE=${CPU[4]} # Get the idle CPU time.
Written by Thanos Apostolou
http://askubuntu.com/questions/53822/how-do-you-run-ubuntu-server-with-a-gui
Some more info can be found here https://help.ubuntu.com/community/ServerGUI. I assume you start with a clean install of Ubuntu Server 16.04 (some modifications may be needed for older versions of Ubuntu). Depending on your needs you can do these:
Minimal GUI:
sudo apt install xorg
sudo apt install --no-install-recommends openbox
Run the command startx and openbox will start (you can open a terminal there and run any application you want)

Proxmox VE Installation on Hetzner Server via Rescue System

Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE.

In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps:

Starting the Rescue System

  1. Log into the Hetzner Robot.
  2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue".
@stonar96
stonar96 / Anti-Xray.md
Last active June 6, 2024 12:01
Recommended Paper Anti-Xray settings by stonar96

❗ This has been moved to the official PaperMC docs ❗

Link: https://docs.papermc.io/paper/anti-xray

Help: https://discord.gg/papermc






Recommended Paper Anti-Xray settings by stonar96

General

Anti-Xray can be configured per world in the paper.yml configuration file. To understand how per world configuration works please read this first. Note that after changing any settings for Anti-Xray you have to restart your server. Executing the /reload command (you should never do this) won't apply the settings to worlds that are already loaded.

@srimaln91
srimaln91 / rocksdb-install.sh
Last active January 23, 2024 13:29
Install RocksDB on Ubuntu 20.04 (Focal Fossa)
#!/bin/bash
ROCKSDB_VERSION=5.11.3
#Run as a root user
if [ "$EUID" -ne 0 ]
then echo "Please run as root (with sudo command)"
exit
fi
@faddat
faddat / pebble-with-mev.bash
Last active March 8, 2023 02:40
use pebbledb and mev-tendermint on any cosmos chain
go mod edit -replace github.com/tendermint/tm-db=github.com/baabeetaa/tm-db@pebble
go mod tidy
go mod edit -replace github.com/tendermint/tendermint=github.com/notional-labs/mev-tendermint@0db69e64a2e87bb29b4417780da30630df97cadd
go mod tidy
go install -ldflags '-w -s -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb -X github.com/tendermint/tm-db.ForceSync=1' -tags pebbledb ./...
@thesamesam
thesamesam / xz-backdoor.md
Last active July 15, 2024 10:34
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that