Skip to content

Instantly share code, notes, and snippets.

View alectrocute's full-sized avatar

Alec Armbruster alectrocute

View GitHub Profile
@alectrocute
alectrocute / wg-watchdog.sh
Last active October 23, 2024 21:19
Script to toggle on/off GL.iNet Beryl AX WireGuard client programmatically
# cron example (wg-watchdog.sh being this file):
# 58 0-7 * * * /root/wg-watchdog.sh
# start config
USERNAME='root'
PASSWORD='mypassword'
HOST='192.168.8.1'
WG_PEER_IP='123.456.5.4'
WG_GROUP_ID=4910 # find in browser devtools
<!-- add to header -->
<link rel="stylesheet" href="https://bgrins.github.io/spectrum/spectrum.css" />
<style>
.sp-replacer {
margin: 0;
overflow: hidden;
cursor: pointer;
padding: 4px;
display: inline-block;
background: #1b1b1b !important;
Example index.php file:
<?php
//if ($_SERVER['REMOTE_HOST'] != "_") {
//echo $_SERVER['SERVER_NAME'] . " blocked.";
// } else {
//echo "hi.";
//}
echo $_SERVER['HTTP_HOST'];
?>
@alectrocute
alectrocute / NGINXNodejsLinode.md
Last active May 6, 2024 07:40
Quick n' easy NGINX & Node.js VPS setup!

Quick n' easy NGINX & Node.js VPS setup!

N|SolidN|Solid N|Solid

Here's the quickest and easiest guide to setting up a little test enviorment. This guide likely applies to any VPS provider or VPS, not just Linode... it's just what I prefer to use. Assuming you know the basics of Linode's VPS system and SSH commands, let's get started!

Configure your Linode

  • Install your favorite flavor of Linux. I prefer Ubuntu.