Skip to content

Instantly share code, notes, and snippets.

View rlam3's full-sized avatar

rlam3

View GitHub Profile
@rlam3
rlam3 / random_notion.py
Created June 4, 2020 02:56 — forked from tangjeff0/random_notion.py
get random notion notes to resurface your old ideas!
'''
author:
@tangjeff0
https://www.notion.so/tangjeff0/Public-Home-0e2636bd409b454ea64079ad8213491f
inspired by: https://praxis.fortelabs.co/p-a-r-a-iii-building-an-idea-generator-400347ef3bb6/
with help from: https://medium.com/@jamiealexandre/introducing-notion-py-an-unofficial-python-api-wrapper-for-notion-so-603700f92369
credits:
@jamiealexandre
@rlam3
rlam3 / disable-cleanmymac.md
Created August 21, 2019 01:26
Mac disables "Setapp CleanMyMac-setapp.HealthMonitor" launchd services

sudo vim /private/var/db/launchd.db/com.apple.launchd/overrides.plist

Add the following code,as entries like:

<key>com.macpaw.CleanMyMac-setapp.HealthMonitor</key>
<dict>
<key>Disabled</key>
<true/>
@rlam3
rlam3 / letsencrypt_2016.md
Created April 3, 2017 23:06 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two modes when you don't want Certbot to edit your configuration:

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.

In the following, we're setting up mydomain.com to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

@rlam3
rlam3 / letsencrypt_2016.md
Created April 3, 2017 23:06 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two modes when you don't want Certbot to edit your configuration:

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.

In the following, we're setting up mydomain.com to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

@rlam3
rlam3 / nginx.conf
Created March 31, 2017 14:35 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rlam3
rlam3 / ElasticSearch.sh
Created April 12, 2016 14:48 — forked from ricardo-rossi/ElasticSearch.sh
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@rlam3
rlam3 / zero_downtime_reindexing.py
Created January 29, 2016 22:12 — forked from ikeikeikeike/zero_downtime_reindexing.py
Elasticsearch Zero Downtime Reindexing using elasticsearch-dsl-py ref: https://www.elastic.co/blog/changing-mapping-with-zero-downtime
from datetime import datetime
from elasticsearch_dsl import (
DocType,
String,
Integer,
Float
)
def _suffix():