You see I’m pretty pissed about Jetbrains. First they turn the buy to own model into a subscription model, then they develop a Go IDE. But what that’s good, right? Yeah in theory that’s awesome, if only it didn’t cost the world. But let me start from the beginning. I use Webstorm because I do…
Read ArticleAngular nl2br
newline to br You don’t need any fancy pipes, all you need is plain old css. Add the following to your name.component.css or name.component.scss (where name is the name of your component)
|
1 2 3 |
.nl2br { white-space: pre-line; } |
and later in your html, assuming your variable is called message.body
|
1 |
<div class="nl2br">{{message.body}}</div> |
And done. Enjoy simplicity.
Read ArticleAdding a SPF record the easy way
You don’t want to read a whole wall of text you want answers. You want to copy/paste this and it should work. Here’s the entry Adding a SPF Record, the easy way
|
1 |
v=spf1 mx a -all |
So you add a TXT record and paste this in the TXT line. What does it mean v=spf1 means version spf1 mx…
Read ArticleDocker stop and remove all containers
|
1 2 |
docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) |
Angular CLI Bootstrap 3 sass jquery and js how to
/usr/local/sbin/bs3ng
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#!/bin/bash if [ -z "$1" ] then echo "usage: $0 <projectname>" exit 1 fi ng new $1 --style=scss cd $1 npm install jquery bootstrap-sass --save cat > src/_variables.scss <<EOF \$icon-font-path: '../node_modules/bootstrap-sass/assets/fonts/bootstrap/'; EOF cat > src/styles.scss <<EOF @import 'variables'; @import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap'; EOF sed -i 's~"scripts": \[\],~"scripts": \[\n\t"../node_modules/jquery/dist/jquery.slim.js",\n\t"../node_modules/bootstrap-sass/assets/javascripts/bootstrap.js"\n\t],~' .angular-cli.json ng serve -o exit 0 |