Link: https://calendar.perfplanet.com/2014/mozjpeg-3-0/
cd /usr/local/src
sudo curl -LO https://github.com/mozilla/mozjpeg/releases/download/v3.1/mozjpeg-3.1-release-source.tar.gz
sudo tar -xzvf mozjpeg-3.1-release-source.tar.gz
cd mozjpeg
Link: https://calendar.perfplanet.com/2014/mozjpeg-3-0/
cd /usr/local/src
sudo curl -LO https://github.com/mozilla/mozjpeg/releases/download/v3.1/mozjpeg-3.1-release-source.tar.gz
sudo tar -xzvf mozjpeg-3.1-release-source.tar.gz
cd mozjpeg
.title { | |
display: block; | |
width: 100%; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
pointer-events: auto; | |
overflow: hidden; | |
} |
PHP 7.4 is now released, and it comes with support for MySQL 8's new password authentication plugin: caching_sha2_password.
Depending on your root username, you will be prompted to enter the password, a hostname, etc. By default, typing mysql in your server terminal should work. If you have trouble logging in, try mysql -p -u root, and entering the root password when asked.
Replace USERNAME and YOUR_PASSWORD with your application database username and the password.
// https://davidwalsh.name/react-indeterminate | |
// To add the indeterminate property to the checkbox, I needed to take advantage of the ref attribute: | |
const { value, checked, indeterminate } = this.props | |
return render( | |
<input | |
type="checkbox" | |
value={value} | |
checked={checked} |
<!-- https://www.w3.org/2005/10/howto-favicon --> | |
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en-US"> | |
<head profile="http://www.w3.org/2005/10/profile"> | |
<link rel="icon" | |
type="image/png" | |
href="http://example.com/myicon.png"> |
const fs = require('fs'); | |
const os = require('os'); | |
const path = require('path'); | |
const TerserPlugin = require('terser-webpack-plugin'); | |
const ManifestPlugin = require('webpack-manifest-plugin'); | |
const {CleanWebpackPlugin} = require('clean-webpack-plugin'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const postcssNormalize = require('postcss-normalize'); |
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
function createUUID() { | |
// http://www.ietf.org/rfc/rfc4122.txt | |
var s = []; | |
var hexDigits = "0123456789abcdef"; | |
for (var i = 0; i < 36; i++) { | |
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); | |
} | |
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010 | |
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01 | |
s[8] = s[13] = s[18] = s[23] = "-"; |
First, install nginx for mac with "brew install nginx". | |
Then follow homebrew's instructions to know where the config file is. | |
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
2. Copy it somewhere (use full path in the example below for server.* files) | |
3. sudo nginx -s reload | |
4. Access https://localhost/ | |
Edit /usr/local/etc/nginx/nginx.conf: |