Skip to content

Instantly share code, notes, and snippets.

View ShabbirHasan1's full-sized avatar
:octocat:
Building Things

Shabbir Hasan ShabbirHasan1

:octocat:
Building Things
  • India
View GitHub Profile
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
@ShabbirHasan1
ShabbirHasan1 / sysctl.conf
Created May 20, 2025 10:41 — forked from maprangzth/sysctl.conf
ubuntu sysctl performance tuning
# Kernel sysctl configuration file for Linux
#
# Version 1.12 - 2015-09-30
# Michiel Klaver - IT Professional
# http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
@ShabbirHasan1
ShabbirHasan1 / cors-proxies.md
Created May 17, 2025 09:21 — forked from reynaldichernando/cors-proxies.md
CORS Proxies (Updated 2025)

CORS Proxies (Updated 2025)

Free

Proxy (A-Z) Methods Status Code Override Headers Exposed Headers Follow Redirect Timeout Size Limit Rate Limit
allorigins ✅ All ❌ (Always 200) 20/min
cloudflare-cors-anywhere ✅ All ✅ Mirror
codetabs ❌ (only GET) ❌ (Always 200) 625KB 5/sec
cors-anywhere (heroku) ✅ All ✅ Mirror ✅ (max. 5) 50/hour
@ShabbirHasan1
ShabbirHasan1 / aiopa.py
Created May 11, 2025 16:13 — forked from gatesn/aiopa.py
PyArrow and Async IO
from typing import AsyncIterator
import pyarrow as pa
class AsyncMessageReader(AsyncIterator[pa.Message]):
"""Wraps an async iterable of bytes into an async iterable of PyArrow IPC messages.
From this it is possible to build an AsyncRecordBatchStreamReader.
"""
@ShabbirHasan1
ShabbirHasan1 / thiserror_backtrace.rs
Created April 19, 2025 07:51 — forked from mikeando/thiserror_backtrace.rs
Example of backtrace usage in thiserror
#![feature(backtrace)]
extern crate thiserror;
use thiserror::Error;
use std::backtrace::Backtrace;
#[derive(Error, Debug)]
pub enum DataStoreError {
//#[error("data store disconnected")]
@ShabbirHasan1
ShabbirHasan1 / dod.md
Created April 18, 2025 06:30 — forked from debasishg/dod.md
Data oriented design, hardware awareness, cache awareness in data structures & algorithms
@ShabbirHasan1
ShabbirHasan1 / AWSLambdaSimpleSMS.js
Created April 17, 2025 16:26 — forked from stevebowman/AWSLambdaSimpleSMS.js
AWS Lambda Function to send an SMS message via the Twilio API
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');

I've been writing Rust full-time with a small team for over a year now. Throughout, I've lamented the lack of clear best practices around defining error types. One day, I'd love to write up my journey and enumerate the various strategies I've both seen and tried. Today is not that day.

Today, I want to reply to a blog post that almost perfectly summarised my current practice.

Go read it; I'll wait!