Skip to content

Instantly share code, notes, and snippets.

View prem911's full-sized avatar

Premananda Mohapatra prem911

  • iFinStrats
  • Bangalore
  • 04:06 (UTC +05:30)
View GitHub Profile
@prem911
prem911 / criticalcss-bookmarklet-devtool-snippet.js
Created August 4, 2017 14:12 — forked from PaulKinlan/criticalcss-bookmarklet-devtool-snippet.js
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@prem911
prem911 / nginx.conf
Created August 2, 2017 19:28 — 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
@prem911
prem911 / docker-compose-postgres.yml
Last active June 23, 2017 11:11 — forked from toast38coza/docker-compose-postgres.yml
Docker-compose files for Kong
version: "2"
services:
postgres:
image: postgres:9.4
container_name: kong-database
ports:
- "5432:5432"
environment:
- POSTGRES_USER=kong
@prem911
prem911 / nginx.conf
Created May 25, 2017 11:49 — forked from nateware/nginx.conf
Nginx sample config for EC2
#
# Sample nginx.conf optimized for EC2 c1.medium to xlarge instances.
# Also look at the haproxy.conf file for how the backend is balanced.
#
user "nginx" "nginx";
worker_processes 10;
error_log /var/log/nginx_error.log info;
<style id="jsbin-css">
#contentContainer {
/*position: relative;*/
/*left:100px;*/
width: 500px;
height: 300px;
border: 1px black solid;
/*overflow: hidden;*/
background-color: #EEE;
cursor: auto;