Skip to content

Instantly share code, notes, and snippets.

View smowtion's full-sized avatar

Smowtion smowtion

View GitHub Profile
@holmberd
holmberd / php-pools.md
Last active April 29, 2025 08:29
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@katopz
katopz / setup-zeromq.sh
Last active April 12, 2025 00:09 — forked from cdjhlee/zeromq_install.sh
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency
@miguelmota
miguelmota / remove_tuxera.sh
Last active March 20, 2025 19:44
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
sudo rm -rf /Applications/Tuxera\ Disk\ Manager.app
sudo rm -rf /Library/Application\ Support/Tuxera\ NTFS
sudo rm -rf /Library/Filesystems/fusefs_txantfs.fs
@tuxfight3r
tuxfight3r / s3_upload.sh
Last active March 4, 2025 14:02
AWS - Upload files to S3 via curl
#!/bin/bash -x
#Date: 21/7/2017
#Author: Mohan
#Purpose: To upload files to AWS S3 via Curl
#Uploads file at the top level folder by default
#S3 parameters
S3KEY="XXXXXXXXXXX"
S3SECRET="XXXXXXXXXXXXXXXX"
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active September 11, 2024 08:13
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.
@smowtion
smowtion / iptv.m3u
Last active November 19, 2019 05:41
#EXTM3U
#EXTINF:0,205: VTV1 HD
udp://@225.1.2.249:30120
#EXTINF:0,206: VTV2
udp://@225.1.2.22:30120
#EXTINF:-1, VTV3 HD
udp://@225.1.2.247:30120
#EXTINF:-1, VTV6 HD
udp://@225.1.2.245:30120
#EXTINF:0,018: HBO HD
@YannRobert
YannRobert / 20-3proxy.conf
Last active February 26, 2024 23:50
working 3proxy configuration for a personal usage proxy
# /etc/fail2ban/jail.d/20-3proxy.conf
[3proxy]
enabled = true
filter = 3proxy
action = iptables[name=3proxy, port=3128, protocol=tcp]
logpath = /var/log/3proxy/3proxy.log*
maxretry = 3
bantime = 3600 ; 1 hour
findtime = 3600 ; 1 hour
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active November 26, 2024 00:41 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@soheilhy
soheilhy / nginxproxy.md
Last active May 14, 2025 20:17
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@lrstanley
lrstanley / tunnel_4to6.py
Last active July 12, 2023 22:27
How to use tunnelbroker tunnels on KVM/OpenVZ/etc. (Debian)
"""
HE-2-4 Copyright (C) 2014 Liam Stanley
License: Eiffel Forum License, version 2
- https://links.ml/FFa1
Website: https://liamstanley.io
NOTE: THIS IS FOR KVM BASED SERVERS ONLY.
I'M NOT ADDING CUSTOM CHECKS TO SEE IF
YOU'RE USING KVM.
"""