Skip to content

Instantly share code, notes, and snippets.

View supreetpal's full-sized avatar

Supreet Pal Singh supreetpal

View GitHub Profile
@supreetpal
supreetpal / cors-nginx.conf
Last active July 8, 2019 18:40 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
include proxy_params;
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Keybase proof

I hereby claim:

  • I am supreetpal on github.
  • I am supreetpal (https://keybase.io/supreetpal) on keybase.
  • I have a public key whose fingerprint is 054E 7B48 F223 497C D73F BC93 F2C8 097A 27A7 4604

To claim this, I am signing this object:

//Hide all
$("ul.nav-list li").each( function(i,e){ e.hidden = true; })
//Unhide top Level
var children1 = $("ul.nav-list")[0].children
for(var i=0; i<children1.length; i++){ children1[i].hidden = false; }
//Select current li
var currentLi = $(".item-"+location.href.substring(location.href.lastIndexOf("/")+1,location.href.lastIndexOf(".")))