Skip to content

Instantly share code, notes, and snippets.

View hteo1337's full-sized avatar
🎯
Focusing

HTeo hteo1337

🎯
Focusing
View GitHub Profile
@hteo1337
hteo1337 / custom_session.py
Created January 31, 2024 19:09
Bypass `[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1006)` with custom `requests.adapters.HTTPAdapter`
from requests import Session
from requests import adapters
from urllib3 import poolmanager
from ssl import create_default_context, Purpose, CERT_NONE
class CustomHttpAdapter (adapters.HTTPAdapter):
def __init__(self, ssl_context=None, **kwargs):
self.ssl_context = ssl_context
super().__init__(**kwargs)
@peter279k
peter279k / install-xrdp-ubuntu-18.04.md
Created July 3, 2021 16:05 — forked from hehuan2112/install-xrdp-ubuntu-18.04.md
Install Remote Desktop (xRDP) for Ubuntu Server 18.04

Install Remote Desktop (xRDP) for Ubuntu Server 18.04

Step 1 – Install xRDP:

sudo apt update
sudo apt install xrdp

Step 2 – Install XFCE4

sudo apt install xfce4

@rajbos
rajbos / Register.ps1
Created July 15, 2020 14:17
Register Windows Startup/Shutdown script
function Register-EventScript {
param (
[string] $eventToRegister, # Either Startup or Shutdown
[string] $pathToScript,
[string] $scriptParameters
)
$path = "$ENV:systemRoot\System32\GroupPolicy\Machine\Scripts\$eventToRegister"
if (-not (Test-Path $path)) {
# path HAS to be available for this to work
@tpoxa
tpoxa / libnsl-dev-ubuntu.sh
Created March 28, 2020 15:40
Install libnsl dev on ubuntu 19.04
apt-get install libtool autoconf gettext unzip -y
mkdir -p /opt && cd /opt && \
wget https://github.com/thkukuk/libnsl/archive/v1.2.0.zip && \
unzip v1.2.0.zip && rm v1.2.0.zip && \
cd /opt/libnsl-1.2.0 && \
./autogen.sh && ./configure && cmake && make install
<?php
/**
* Generated by the WordPress Option Page generator
* at http://jeremyhixon.com/wp-tools/option-page/
*/
class MyExamplePlugin {
private $my_example_plugin_options;
@llbbl
llbbl / fix_openssl_catalina.sh
Last active November 3, 2023 06:05
fix missing openssl files in catalina
#!/bin/bash
echo 'update brew'
brew update
echo 'upgrade brew'
brew upgrade
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active December 17, 2025 20:44
Ubuntu and Debian Cloud images in Proxmox
@lon-io
lon-io / db_backup.sh
Created July 15, 2019 07:41 — forked from NARKOZ/db_backup.sh
MySQL backup shell script
#!/bin/bash
# Shell script to backup MySQL database
# Set these variables
MyUSER="" # DB_USERNAME
MyPASS="" # DB_PASSWORD
MyHOST="" # DB_HOSTNAME
# Backup Dest directory
DEST="" # /home/username/backups/DB
@lucashalbert
lucashalbert / configure_k8s.sh
Created March 7, 2019 17:31
Script to install and configure kubernetes on CentOS-7
#######################
# === All Systems === #
#######################
# Ensure system is fully patched
sudo yum -y makecache fast
sudo yum -y update
# Disable swap
sudo swapoff -a