Skip to content

Instantly share code, notes, and snippets.

View underscorenygren's full-sized avatar

Erik Nygren underscorenygren

View GitHub Profile
@lg
lg / cloudy-gamer-launcher.sh
Last active April 28, 2021 14:25
Easily start/stop Paperspace and Parsec instances
#!/bin/bash
#
# CloudyGamerLauncher by Larry Gadea
# Easily start/stop Paperspace and Parsec instances
#
# Make sure to fill out the variables below. For the machine id, use the
# 8-letter identifier for the machine on Paperspace (ex. PS8RGDUY)
#
# Note: Requires Paperspace API key (generate one in account settings)
@mustafaturan
mustafaturan / network-tweak.md
Last active February 29, 2024 15:08
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
@conorbranagan
conorbranagan / gist:4513828
Last active April 13, 2024 20:06
Linux System Metrics

Linux System Metrics

CPU

  • system.cpu.idle: % Idle CPU
  • system.cpu.system: % System CPU
  • system.cpu.user: % User CPU

Disk