`docker run -d
--name graphite
--rm
-p 80:80
-p 2003-2004:2003-2004
-p 2023-2024:2023-2024
-p 8125:8125/udp\
It is possible to run 3 consul servers on the same IP address if you shift the various ports to unique numbers to avoid conflict, but you don't have to do that.
Instead, add interface alias's in your /etc/rc.local
(just before the exit 0
), e.g.:
In my case, wlan0 is a dhcp assigned interface. The following commands add three new alias interfaces, wlan0:1, etc, with their own stat IP Addresses.
ifconfig wlan0:1 inet 10.0.0.41 netmask 255.255.255.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.gitconfig | |
# `useHttpPath` tells git to match the ENTIRE path. It's all or none, baby. | |
[user] | |
name = <Your Name> | |
email = [email protected] | |
[credential] | |
useHttpPath = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// One does this to be happy: | |
$(document).on('click', '#some_id', () => { | |
// Something | |
}) | |
// One does this to be sad | |
$('#some_id').click(() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sort array of JSON objects by date value | |
const records = [ | |
{ | |
order_id: 12345, | |
order_date: "2020-03-23" | |
}, | |
{ | |
order_id: 12346, | |
order_date: "2020-03-20" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
233.66 + 157.55 | |
// returns: 391.21000000000004 | |
// Because: https://stackoverflow.com/questions/588004/is-floating-point-math-broken/27030789#27030789 | |
// As toFixed() converts to a string, use Math.round() | |
// 2 decimal places: | |
Math.round( (233.66 + 157.55)) * 1e2 ) / 1e2 |
Testing Gist naming....
This works for my Dell Ultra Wide monitor.
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
Credit to Chris Hoffman: https://www.howtogeek.com/358596/how-to-fix-blurry-fonts-on-macos-mojave-with-subpixel-antialiasing/
NewerOlder