Skip to content

Instantly share code, notes, and snippets.

View Machou's full-sized avatar
🏠
Working from home

Machou Machou

🏠
Working from home
  • Arround The World !
  • 05:47 (UTC +02:00)
View GitHub Profile
@Machou
Machou / latency.markdown
Created January 13, 2020 03:35 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

- regarder Star Wars sur Telnet
pkgmgr /iu:"TelnetClient"
telnet towel.blinkenlights.nl
ou
nc towel.blinkenlights.nl 23
- awesome-console-services
https://github.com/chubin/awesome-console-services
@Machou
Machou / Shell.md
Last active December 21, 2023 13:52

Faille .htaccess

  1. On se connecte via sFTP / SSH et on crée un symlink vers /

sudo ln -s / "racine"

  1. On créé le fichier .htaccess
AddDefaultCharset UTF-8

Vérifier l’usage du CPU en PHP

<?php
if(file_exists('/proc/loadavg') AND is_readable('/proc/loadavg'))
{
	$fh = fopen('/proc/loadavg', 'r');
	$load_averages = fread($fh, 64);
	fclose($fh);
@Machou
Machou / coco.js
Last active May 18, 2024 19:19
Code source JavaScript de https://coco.gg/
https://www.coco.gg/chat/clico.js
function clicus(e)
{
if (!e)
var e = window.event;
if (document.all)
{ //IE4,IE5,IE6
xmouse = e.clientX;
ymouse = e.clientY;