Skip to content

Instantly share code, notes, and snippets.

@lman
lman / 0_reuse_code.js
Created February 21, 2014 19:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lman
lman / MongoDB_macOS_Sierra.md
Created September 15, 2018 14:28 — forked from nrollr/MongoDB_macOS_Sierra.md
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@lman
lman / nginx-tuning.md
Created June 18, 2020 00:02 — forked from denji/nginx-tuning.md
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.

@lman
lman / trial-reset.py
Created October 29, 2022 11:39 — forked from rehannali/trial-reset.py
Trial Reseter for MAC
import os
from pathlib import Path
from sys import argv
class ResetTrial:
path = str(Path().home()) + "/Library/"
file_array = []
dir_array = []
@lman
lman / example.com.conf
Created December 14, 2022 20:49 — forked from donpdonp/example.com.conf
nginx.conf https only with letsencrypt using lego client
# /etc/nginx/sites-enabled/example.com.conf
server {
listen 80;
server_name .example.com;
location / {
return 301 https://$host$request_uri;
}
}