Skip to content

Instantly share code, notes, and snippets.

View melroy89's full-sized avatar
🏳️‍🌈
Decentralizing the WWW

Melroy van den Berg melroy89

🏳️‍🌈
Decentralizing the WWW
View GitHub Profile
@denji
denji / nginx-tuning.md
Last active November 5, 2024 10:10
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@pascalpoitras
pascalpoitras / config.md
Last active October 7, 2024 01:35
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@therealmarv
therealmarv / checkopenssl.md
Last active May 31, 2024 23:28
Check OpenSSL version from Python

Open python

python

and type

>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.1g 7 Apr 2014'
@paulochf
paulochf / countries.sql
Last active April 26, 2024 09:50 — forked from adhipg/countries.sql
Outdated. Used with discretion. Accepting updates.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@sharshenov
sharshenov / gist:edaca25b3b9094359c95f4ae66cd4222
Created July 22, 2016 16:55
Using wkhtmltopdf without X server
apt-get install wkhtmltopdf
apt-get install xvfb
echo -e '#!/bin/bash\nxvfb-run -a --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf -q $*' > /usr/bin/wkhtmltopdf.sh
chmod a+x /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
wkhtmltopdf http://www.google.com output.pdf
@cookiengineer
cookiengineer / apt-pac.sh
Last active September 11, 2023 20:06
APT-PAC - pacman with APT syntax
#!/bin/bash
# Save this file as /usr/bin/apt-pac and chmod +x it.
case "$1" in
autoremove)
pacman -Rns $(pacman -Qdtq);
;;
# Enable request logging in Odoo using one of the following:
# * pass --log-level=debug_rpc
# * or pass --log-handler=odoo.http.rpc.request:DEBUG (to only debug request times)
# * or set the equivalent config option in the Odoo config file
# Then save the following as a munin plugin to monitor the last 5 minutes of your Odoo config file
# Be sure to set the correct path for the Odoo log file, and adjust the variables as needed
#!/bin/bash
@jbjonesjr
jbjonesjr / getting-going-best-practices.md
Created May 2, 2018 19:57
Getting Going and Best Practices Guide

GitHub Onboarding and Introduction

A guide for getting started and best practices for teams new to, or improving their interactions with, GitHub

image GitHub's features and capabilities

This document is meant to help new teams to GitHub familiarize themselves with the features and platform, as well as start to explore some of the best practices. While not a complete exploration, it's meant as a introduction to the key tenets of using GitHub for your business. For teams and organizations that desire more one on one support, GitHub Professional Services has many different options available to customize tools, training, and process to best meet your needs. The GitHub offerings listed in the diagram above are just a sampling of the various capabilities and we'd love to create a customized offering to meet your specific organizational needs.

Overview and Intr

@TrillCyborg
TrillCyborg / mastodon-docker-setup.md
Last active October 7, 2024 11:08
Mastodon Docker Setup

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@cliffordp
cliffordp / functions.php
Created September 23, 2019 00:29
Add JSDelivr as a prefetch resource provider to speed up page load times in WordPress
<?php
add_filter( 'wp_resource_hints', 'your_add_resource_hints', 10, 2 );
/**
* Try to improve performance with resource hints.
*
* WP will output protocol-relative 'dns-prefetch' for all scripts and styles which are enqueued
* from external hosts.
* WP will not do 'preconnect', 'prefetch', or 'prerender' automatically.