Skip to content

Instantly share code, notes, and snippets.

@rom3r4
rom3r4 / compress.js
Created January 6, 2021 07:31 — forked from aldo-roman/compress.js
Brotli compression with Angular CLI
const brotli = require('brotli')
const fs = require('fs')
const brotliSettings = {
extension: 'br',
skipLarger: true,
mode: 1, // 0 = generic, 1 = text, 2 = font (WOFF2)
quality: 10, // 0 - 11,
lgwin: 12 // default
}
@rom3r4
rom3r4 / Python3 Virtualenv Setup.md
Created September 30, 2020 21:54 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@rom3r4
rom3r4 / fix-libv8-mac.txt
Created February 12, 2020 19:40 — forked from fernandoaleman/fix-libv8-mac.txt
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@rom3r4
rom3r4 / install-comodo-ssl-cert-for-nginx.rst
Created July 2, 2016 17:03 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@rom3r4
rom3r4 / gist:ba0c1001b696d5faaa5f1f1a29436ef3
Created April 14, 2016 00:47 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
@rom3r4
rom3r4 / tmux-cheatsheet.markdown
Created January 17, 2016 04:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
#!/bin/bash
#
# Script to install/upgrade Nginx(Naxsi,PageSpeed,PCRE) from sources on CentOS 6
#
# Author: Duc Hieu - 12/2014.
# Base System: CentOS release 6.6 (Final)
# License: MIT
#
# Syntax: # sh nginx_install.sh
#
@rom3r4
rom3r4 / nginx.conf
Last active August 29, 2015 14:15 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rom3r4
rom3r4 / nginx.conf
Last active August 29, 2015 14:13 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rom3r4
rom3r4 / default.vcl
Last active August 29, 2015 14:08 — forked from reifman/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}