Skip to content

Instantly share code, notes, and snippets.

@jfeilbach
jfeilbach / sysctl.conf.md
Last active May 1, 2024 16:44
10/40 Gb NIC Linux Kernel Performance Tuning for samba file server

TCP tuning

The most important TCP tuning areas since kernel 4.9 are:

  • packet pacing
  • dynamic TSO sizing
  • TCP small queues
  • BBR TCP congestion algorithm

Definitions

  • Gb = gigabit
@a-tal
a-tal / id_ranges.md
Last active March 9, 2024 17:34
EVE Online ID ranges
from to description
0 10,000 System items (including junkyards and other special purpose items
500,000 1,000,000 Factions
1,000,000 2,000,000 NPC corporations
3,000,000 4,000,000 NPC characters (agents and NPC corporation CEO's)
9,000,000 10,000,000 Universes
10,000,000 11,000,000 NEW-EDEN Regions
11,000,000 12,000,000 Wormhole Regions
12,000,000 13,000,000 Abyssal regions
@jivoi
jivoi / gist:a33ace2e25515a31aa2ffbae246d98c9
Created June 14, 2017 13:27
Serving Random Payloads with NGINX
# Serving Random Payloads with NGINX
# add set_random module https://github.com/openresty/set-misc-nginx-module#set_random
# edit file /etc/nginx/sites-enabled/default
set_random $uri 1 3;
map $uri $payloads {
1 /payload.lnk;
2 /payload.hta;
3 /payload.exe;
@mnot
mnot / snowden-ietf93.md
Last active September 12, 2023 13:40
Transcript of Edward Snowden's comments at IETF93.
@githubutilities
githubutilities / README.md
Last active October 21, 2022 02:23
Shadowsocks proxy and ssh proxy

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@karpathy
karpathy / gist:587454dc0146a6ae21fc
Last active March 19, 2024 05:50
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@madjar
madjar / scrapper.py
Last active March 5, 2023 15:02
A example of scrapper using asyncio and aiohttp
import asyncio
import aiohttp
import bs4
import tqdm
@asyncio.coroutine
def get(*args, **kwargs):
response = yield from aiohttp.request('GET', *args, **kwargs)
return (yield from response.read_and_close(decode=True))
@hlung
hlung / How to connect a PS3 controller.md
Last active March 25, 2024 14:45
How to connect PS3 controller on Mac OSX, PC

How to connect PS3 controller on Mac OSX, PC, etc.

This is how you connect PS3 controller to Mac OSX, PC, etc. when previously connected to a PS3. You will need a Mini USB cable. Overcome your laziness, get up of your chair, and go get one!

A big misconception is that keep holding PS button will reset the controller's pairing. It DOES NOT! From my testings, the controller keeps paring with the last machine it was CONNECTED VIA A USB CABLE.

Here are the steps:

@marsam
marsam / pdfcrop.py
Last active July 16, 2023 15:16
pdf crop
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Pdfcrop
=======
Based on pdfcrop.pl_. Uses the BoundingBox [#]_
Dependencies:
- PyPDF2_
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048