Skip to content

Instantly share code, notes, and snippets.

View itwars's full-sized avatar
😎
C◎⦿L

Vincent RABAH itwars

😎
C◎⦿L
View GitHub Profile
@fabianoriccardi
fabianoriccardi / Comparison Espressif ESP MCUs.md
Last active March 30, 2024 22:55
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@maxivak
maxivak / _0__ssl_certbot_letsencrypt.md
Last active April 16, 2024 21:48
Let's encrypt SSL certificates using certbot in docker

Directories on host machine:

  • /data/certbot/letsencrypt

  • /data/certbot/www

  • Nginx server in docker container

docker run -d --name nginx \
@mtunjic
mtunjic / disable.sh
Last active March 31, 2024 18:12
Disable bunch of #$!@ in Catalina
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active March 28, 2024 01:45
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@T0MM0R
T0MM0R / haproxy.cfg
Last active April 20, 2024 01:37 — forked from thisismitch/haproxy.cfg
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@itwars
itwars / brewcask-update.sh
Last active August 29, 2015 14:01
Snippet that you must start right after a brew update to be notify of what brew cask app need to be updated on your Mac OSX
#!/usr/bin/env bash
#┌───────────────────────────────┐
#│ Print cask packages thet need │
#│ to be updated │
#└───────────────────────────────┘
caskList=( $(brew cask list) )
for i in "${caskList[@]}"; do
info=( $(brew cask info $i) )
@denji
denji / nginx-tuning.md
Last active April 26, 2024 11:21
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

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.

@obazoud
obazoud / clean-docker.sh
Last active September 27, 2022 04:56
Remove docker image without tag
#!/bin/bash
sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)
sudo docker ps -a | grep 'months ago' | awk '{print $1}' | xargs sudo docker rm
sudo docker images | grep "\<none\>" | awk '{ print $3 }' | xargs sudo docker rmi
@itwars
itwars / nodejs-rpi.sh
Last active February 1, 2017 09:20
Node.JS Raspberry Pi Package builder Raspbian See details on http://nodejs-news.com
#!/bin/bash
#---------------------------------------
# Node.JS Raspberry Pi Package builder
# Raspbian
# http://nodejs-news.com
#---------------------------------------
echo "-> Getting fpm (Effing package managers) Ruby gem"
sudo gem install fpm --no-ri --no-rdoc