- Use UTF-8. It’s 21 century, 8bit encodings dead now.
- Use 2 space indent, not tabs
- Use Unix-style line endings
- Keep lines not longer than 80 chars
- Remove trailing whitespace
/** | |
* Jest Conversion script | |
* This script isn't the cleanest, and uses two different methods for performing global replaces... but it gets the job done. | |
* We switched from using the `replace` method to the `advancedReplace` about 70% of the way through, and couldn't go and retrofit | |
* `advancedReplace` everywhere with 100% confidence. However, should you use this script as a base for your own migration, | |
* I would definitely suggest using `advancedReplace`, which uses the node-replace library. | |
*/ | |
import {sync as globSync} from 'glob' | |
import {execSync} from 'child_process' | |
import fs from 'fs' |
about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".
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 | |
} |
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 |
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.
#!/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 |
#!/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 | |
# |