Skip to content

Instantly share code, notes, and snippets.

View Ardumine's full-sized avatar

Ardumine Ardumine

View GitHub Profile
@ma7555
ma7555 / sstp_server.md
Last active April 20, 2025 08:35
SSTP VPN Server with Docker on Ubuntu VPS

On the VPS:

  • Create a 10 year certificate. The "Common Name" (CN) must be the static IP of the instance.
    openssl req  -nodes -new -x509 -keyout key.pem -out cert.pem -days 3650
  • Run the SoftEther docker with either of the following:
    1. A Single User, SSTP only. Not updated recently (7 years ago at the time of creating the gist)
    sudo docker run -d --cap-add NET_ADMIN -e SSTP_ENABLED=1 -e USERNAME=YOUR_VPN_USERNAME -e PASSWORD=YOU_VPN_PASS -e SERVER_PWD=YOUR_SERVER_PASS -e CERT="$(cat cert.pem)" -e KEY="$(cat key.pem)" -p 443:443/tcp fernandezcuesta/softethervpn
@pharaoh1
pharaoh1 / ios_14_downgrade.md
Created December 10, 2021 18:37
How to downgrade from iOS 15 to iOS 14

How to downgrade from iOS 15 to iOS 14

The latest SEP/BB as of right now is iOS 15.1, and is partially or fully compatible with iOS 14 depending on your device. See the appropriate section for exact compatibility info.

Prequisites

Notes

  • If the exploit fails even after multiple attempts or your device reboots out of DFU mode, you'll have to start over from the beginning and be quicker next time. (You don't have to redownload anything though.) You may have to force restart your device if it's stuck in DFU.
@devbdavis
devbdavis / Readme.md
Last active October 6, 2025 14:28
ESP32-S2 Keyboard on Arduino
@Matheus-Garbelini
Matheus-Garbelini / esp8266_wpa2_enterprise_example.ino
Last active December 4, 2025 11:23
ESP8266 Wi-Fi WPA2 Enterprise example
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
#include "wpa2_enterprise.h"
#include "c_types.h"
}
// SSID to connect to
char ssid[] = "TEST_KRA";
@3735943886
3735943886 / SetMonitorPower.c
Last active July 17, 2025 11:30
Turn On / Off display monitor
/* dependencies */
#pragma comment(lib, "dxva2")
#pragma comment(lib, "user32")
#include <lowlevelmonitorconfigurationapi.h>
typedef struct _MONITORPOWERPARAM
{
LPCWSTR szPhysicalMonitorDescription;
BOOL bPowerOn;
} MONITOR_POWER_PARAM, *PMONITOR_POWER_PARAM;
@Kautenja
Kautenja / tar-progress.md
Last active December 12, 2025 14:46
one-liners for using tar with gzip and pv for a progress bar

Compress

tar cf - <files> -P | pv -s $(du -sb <files> | awk '{print $1}') | gzip > <some .tar.gz file>

where:

  • `` is the root-mounted (i.e. starts with /) path to the files
@kotobuki
kotobuki / script.js
Last active August 7, 2024 14:34
Web Bluetooth with micro:bit (UART)
// https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html
// An implementation of Nordic Semicondutor's UART/Serial Port Emulation over Bluetooth low energy
const UART_SERVICE_UUID = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
// Allows the micro:bit to transmit a byte array
const UART_TX_CHARACTERISTIC_UUID = "6e400002-b5a3-f393-e0a9-e50e24dcca9e";
// Allows a connected client to send a byte array
const UART_RX_CHARACTERISTIC_UUID = "6e400003-b5a3-f393-e0a9-e50e24dcca9e";
@kotobuki
kotobuki / script.js
Last active July 28, 2024 15:23
Web Bluetooth with micro:bit (Acceleration)
// https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html
const ACCELEROMETER_SERVICE_UUID = "e95d0753-251d-470a-a062-fa1922dfa9a8";
const ACCELEROMETER_DATA_UUID = "e95dca4b-251d-470a-a062-fa1922dfa9a8";
let uBitDevice;
let sinThetaX = 0;
let sinThetaY = 0;
let lastAccelerationX = 0;
let lastAccelerationY = 0;