How To Fix DNS Lookup Issues on Macos Mojave 10.14.6
dscacheutil -flushcache System Preferences -> Network -> Advanced -> DNS -> Add 1.1.1.1, 8.8.4.4 and 8.8.8.8 at the top. If they are already there, CHANGE THE ORDER!
dscacheutil -flushcache System Preferences -> Network -> Advanced -> DNS -> Add 1.1.1.1, 8.8.4.4 and 8.8.8.8 at the top. If they are already there, CHANGE THE ORDER!
I wanted to empty the time series data cache from the Prometheus server to start clean. The best practice is to use the administrative HTTP API via curl. For example, to clear all data for job mysqld as defined in the prometheus.yml configuration file:
1 |
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={job="mysqld"}' |
If you want to delete ALL data from Prometheus, then […]
Quickref: How to Remove a file from the staging area
1 |
git rm --cached {fileName(s)} |
The Story Recently, I accidentally added some files to git’s pre-commit phase, i.e.:
1 2 3 4 5 6 7 8 9 10 11 12 |
shell> git status On branch master Your branch is up-to-date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: good1.xml new file: good2.xml new file: bad1.xml new file: bad2.xml modified: good3.xml modified: bad3.xml |
For example, here is how to handle the above situation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
shell> git rm --cached bad1.xml bad2.xml bad3.xml shell> git status On branch master Your branch is up-to-date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: good1.xml new file: good2.xml modified: good3.xml Untracked files: (use "git add <file>..." to include in what will be committed) bad1.xml bad2.xml bad3.xml |
To better understand, here are the phases/states/stages that git uses: Untracked – when a file is first created, git […]
MacOSX 10.6.8 Snow Leopard running on a Mac Pro 2009 8-way After a system crash, using the backup drive, this error started to appear: dyld: shared cached file was build against a different libSystem.dylib, ignoring cache To fix it, execute the following in Terminal: sudo update_dyld_shared_cache -force As always, YMMV!
Jun 17 00:02:45 inbound dovecot: IMAP(yourName): Corrupted index cache file /home/yourName/Maildir/dovecot.index.cache: invalid record size
1 2 3 4 |
service dovecot stop cd /home/yourName/Maildir/ rm dovecot.index* service dovecot start |
As always, YMMV. Proceed with caution.
I found a fantastic tutorial on using the W3 Total Cache plugin with Amazon’s S3/CDN that I had to share: http://www.makeuseof.com/tag/give-wordpress-blog-lightning-fast-speeds-w3-total-cache/ The basic gist of the article says to do the following: Install and activate the W3 Total Cache plugin Sign up for Amazon Web Services (AWS) Obtain your AWS Access and Secret key pair […]
To monitor Varnish, simply run: # varnishlog http://www.varnish-cache.org/docs/2.1/reference/index.html http://www.varnish-cache.org/docs/2.1/tutorial/increasing_your_hitrate.html Important Note: By default, Varnish will NOT cache pages that have cookies!!! http://www.varnish-cache.org/trac/wiki/VCLExampleCacheCookies sub vcl_recv { unset req.http.cookie; } sub vcl_fetch { unset beresp.http.set-cookie; }