Skip to content

Instantly share code, notes, and snippets.

@sharpec
sharpec / socket.io-1-0-apache-2.4-ssl.conf
Created April 13, 2022 06:28 — forked from iacchus/socket.io-1-0-apache-2.4-ssl.conf
Set reverse proxy websockets in Apache 2.4 using socket.io 1.0. Needs mod_rewrite module, this version uses SSL. As seen here https://serverfault.com/questions/616370/configuring-apache-2-4-mod-proxy-wstunnel-for-socket-io-1-0
<VirtualHost *:80>
ServerName forum.example.com
Redirect permanent / https://forum.example.com
</VirtualHost>
<VirtualHost *:443>
ServerName forum.example.com
@sharpec
sharpec / DevMachineSetup.ps1
Last active September 16, 2021 04:10 — forked from codebytes/DevMachineSetup.ps1
DevMachineSetup
# Command to run
# PowerShell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/sharpec/eb50a74bcc6f05ddc832f993b351aaa0/raw/'))"
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
@sharpec
sharpec / innobackupex-restore.sh
Last active March 16, 2017 15:14 — forked from dalecaru/innobackupex-restore.sh
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona. Tested with Percona Server 5.7.17-11 and percona-xtrabackup-24 on CentOS Linux release 7.1.1503 (Core)
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
##### OVERWRITE CENTOS 7 OPEN FILE LIMIT
ulimit -n 4096
INNOBACKUPEX=innobackupex
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX