-
npm – Error installing angular/cli on macOS mojave – node-pre-gyp – Stack Overflow
“npm cache clean –force / npm cache verify
xcode-select –install
npm install -g node-gyp
npm install -g @angular/cli (without sudo).
“
Update (weekly)
-
How to render string with html tags in Angular 4+? – Stack Overflow
“[innerHTML]=”comment””
-
Using the SQL Coalesce function in SQL Server
“The SQL Coalesce function is a syntactic shortcut for the Case expression
“ -
Upgrading | Grafana Documentation
“If you use sqlite you only need to make a backup of your grafana.db file. This is usually located at /var/lib/grafana/grafana.db “
-
Fix for blank Gnome Control Center / Settings with i3wm on Fedora 27 : Fedora
“env XDG_CURRENT_DESKTOP=GNOME gnome-control-center”
Update (weekly)
Update (weekly)
-
Apache Redirect to HTTPS – How to Redirect to HTTPS on Apache – Namecheap
“RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] “
Update (weekly)
-
httpd.conf – Apache Proxy: No protocol handler was valid – Stack Overflow
“sudo a2enmod ssl
sudo a2enmod proxy
sudo a2enmod proxy_balancer
sudo a2enmod proxy_http” -
How To Secure Apache with Let’s Encrypt on CentOS 7 | DigitalOcean
“sudo certbot –apache -d example.com”
-
JavaScript in an HREF or SRC Attribute
“javascript:alert(11)”
Update (weekly)
-
Visual Studio Code – Terminal (PowerShell) – how to copy text – Stack Overflow
“You can now automatically copy whenever you select text in the terminal:
“terminal.integrated.copyOnSelection”: true”
-
Case insensitive sorting in MongoDB – Stack Overflow
“db.collection.aggregate([
{ “$project”: {
“field”: 1,
“insensitive”: { “$toLower”: “$field” }
}},
{ “$sort”: { “insensitive”: 1 } }
])” -
$project (aggregation) — MongoDB Manual
“if you exclude fields, you cannot also specify the inclusion of fields, reset the value of existing fields, or add new fields”
Update (weekly)
-
” Make sure you share your formControlName between mat-radio-group/mat-checkbox and the ugly [matInput] {display:none}”
-
<mat-form-field floatPlaceholder=“always“ class=“mat-form-field–no-underline“> <!– the matInput with display:none makes the magic. It’s ugly, I’ve warned you –> <input matInput placeholder=“Input“ style=“display: none“ > <mat-radio-group> <mat-radio-button value=“1“>Option 1</mat-radio-button> <mat-radio-button value=“2“>Option 2</mat-radio-button> </mat-radio-group> </mat-form-field>
-
-
Creating Multifield Indexes in Mongoose / MongoDB – Stack Overflow
“mySchema.index({field1: 1, field2: 1}, {unique: true});
“
Update (weekly)
-
html – Make body have 100% of the browser height – Stack Overflow
“html {
height: 100%;
}
body {
min-height: 100%;
}” -
Angular – Set the Document Title
” public constructor(private titleService: Title ) { }”
-
this.titleService.setTitle( newTitle );
-
-
node.js – error ReferenceError: ObjectID is not defined – Stack Overflow
“var ObjectId = require(‘mongodb’).ObjectID;”
-
“When using findOneAndUpdate and related methods, mongoose doesn’t automatically run validation. To trigger this, you need to pass a configuration object. For technical reasons, this plugin requires that you also set the context option to query.
{ runValidators: true, context: ‘query’ }”
-
mongodb – How do you query for “is not null” in Mongo? – Stack Overflow
“db.mycollection.find({“IMAGE URL”:{$ne:null}});”
-
Eclipse Photon, Skip Welcome, CheckBox missing – Stack Overflow
“$WORKSPACE/.metadata/.plugins/org.eclipse.ui.intro/introstate
is a tag state with attribute reopen set to “true”. Changing that to “false” worked”
Update (weekly)
-
javascript – Importing lodash into angular2 + typescript application – Stack Overflow
“import _ from “lodash”;”
-
“if you really intend to set partial values, use patchValue method”
-
javascript – mongoose “Find” with multiple conditions – Stack Overflow
“{$or:[{region: “NA”},{sector:”Some Sector”}]}”
-
Angular Material Paginator: How to trigger go to first page event on ts file – Stack Overflow
“this.paginator.firstPage();
lastly you should change your paginator length, i made this like that;
this.paginator.length=mock.length;”
Update (weekly)
-
JavaScript | Array.find() Method – GeeksforGeeks
“Here the Array.find() method in JavaScript returns the value of the first element in the array that satisfies the provided testing function”
-
sql – How to query MongoDB with “like”? – Stack Overflow
“db.users.find({“name”: /.*m.*/})”
Posted from Diigo. The rest of my favorite links are here.