Skip to content

Instantly share code, notes, and snippets.

@manish-2014
manish-2014 / gist:ff9c2ff658d7613626e078ebe225072d
Created November 17, 2020 17:13
Setting up NGINX reverse proxy for shadow-cljs development
; project.clj
:devtools {:http-root "resources/public"
:http-port 8281
:devtools-url "https://localqa1.myserver.com/shadow-cljs"
:use-document-protocol true
}}}}
; assuming you already have a sites-available file for localqa1.myserver.com
;localqa1.myserver.com
Process for setting up github pages with namecheap domain.
1. Go to namecheap.com, select and buy domain name.
2. Login to namecheap, go to username drop down and select dashboard.
3. Go to DomainList
4. Click manage button
5. Click Advanced DNS tab
6. Click add record and add three records:
Type: A Record | Host: @ | Value: 192.30.252.153 | TTL: Automatic
(ns api-project.cors)
(def cors-headers
"Generic CORS headers"
{"Access-Control-Allow-Origin" "*"
"Access-Control-Allow-Headers" "*"
"Access-Control-Allow-Methods" "GET"})
(defn preflight?
"Returns true if the request is a preflight request"
@leommoore
leommoore / mongodb_ssl_with_letsencrypt.md
Last active August 16, 2022 17:35
MongoDB 3.2.x SSL with Letsencrypt

MongoDB 3.2.x SSL with Letsencrypt

Letsencrypt is an initative which aims to increase the use of encryption for websites. It basically allows people to apply for free certificates provided that they prove the they control the requested domain. We will look at the what is needed to secure your MongoDB installation. For more details on setting up a MongoDB server see MongoDB 3.2.x.

Set the hostname

We sould to set the hostname to match the name of the certificate we are going to optain.

sudo hostname mongo0.example.com

Then update the hostname file to set the server name permanently.

@rboyd
rboyd / random-str.clj
Created February 28, 2013 03:30
random string (clojure)
(defn rand-str [len]
(apply str (take len (repeatedly #(char (+ (rand 26) 65))))))
@cheeaun
cheeaun / putonglasses.txt
Created September 14, 2012 08:57
put on glasses unicode
•_•)
( •_•)>⌐■-■
(⌐■_■)