Skip to content

Instantly share code, notes, and snippets.

@sgs00
sgs00 / how-to-integrate-wsl-with-windows-10.md
Created February 29, 2024 00:03 — forked from shakahl/how-to-integrate-wsl-with-windows-10.md
How to seamlessly integrate Windows Subsystem for Linux (WSL) with Windows

How to seamlessly integrate Windows Subsystem for Linux (WSL) with Windows

Installation

Install an Ubuntu version from Microsoft Store.

Please check out the Windows 10 Installation Guide written by Microsoft itself.

@sgs00
sgs00 / centos7_ps_install.sh
Last active April 7, 2019 19:13 — forked from hpandelo/centos7_ps_install.sh
CentOS 7: PrestaShop 1.7.5.1 installer
#!/bin/bash
PS_VERSON=1.7.5.1
prompt_confirm() {
while true; do
read -r -n 1 -p "${1:-Continue?} [y/n]: " REPLY
case $REPLY in
[yY]) echo ; return 0 ;;
[nN]) echo ; return 1 ;;
@sgs00
sgs00 / get-free-tcp-port.py
Created January 2, 2018 15:41 — forked from gabrielfalcao/get-free-tcp-port.py
Getting a random free tcp port in python using sockets
# Getting a random free tcp port in python using sockets
def get_free_tcp_port():
tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp.bind(('', 0))
addr, port = tcp.getsockname()
tcp.close()
return port
@sgs00
sgs00 / gmail.py
Last active August 29, 2015 14:19 — forked from rotated8/email.py
from email.mime.text import MIMEText
import smtplib
gmail_username = 'username@gmail.com'
recipients = 'recipient@example.com'
# https://en.wikipedia.org/wiki/List_of_SMS_gateways
# 10DigitNumber@text.att.net for AT&T
# 10DigitNumber@vtext.com for Verizon
msg = MIMEText('This is the body of the message.')
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#