People who write Go are called “Gophers.” Yeah, there are many “Go” puns “going” around. Golang is a statically-typed compiled language which was created by Google. Due to its high performance and simple syntax, Go is widely used in Kubernetes and Docker.

Javascript is a great language. Javascript is a loosely typed language which means sometimes when we pass arguments into functions or access/set properties on objects, Javascript does not throw an error. Typescript seeks to solve this issue using a strongly-typed approach. Typescript is built on top of Javascript (Typescript compiles…

I’m a total newbie to Microsoft SQL Server Management Studio (“SSMS”). I’m trying to debug SQL functions and getting totally lost. To make matters worse, SSMS does not have a built-in query debugger. Fortunately, you can debug your SQL queries in Visual Studio

Here is a simple set up to display a google maps street view in Vue/Nuxt. We create a new google maps instance and pass in the HTML element where we want to attach the google map. We also specify the lat/lng where we want the map to display.

<template>
<div id="open-house-wrapper"></div>
</template>
<script>
export default {
mounted(){
new google.maps.StreetViewPanorama(
document.getElementById("open-house-wrapper"),
{
position: { lat: 42.345573, lng: -71.098326 },
pov: {
heading: 0,
pitch: 0,
},
}
);
}
}
</script>
<style lang="scss" scoped>
#open-house-wrapper{
width: 100%;
height: 100%;
}
</style>

Let’s get started…

npm install --save-dev node-sass sass-loader

2. Install the style-resources plugin

npm install --save-dev @nuxtjs/style-resources

3. In the assets folder, create a new directory called “scss.” Inside of this new directory, create a file called “colors.scss.” In colors.scss, add the following:

$color-variable: #4EA5D9;

4. Add the following to nuxt.config.js. Make sure you retain the order below: css => modules => styleResources otherwise the the modules may not load correctly.

export default {
//...
css: [
'~assets/scss/colors.scss'
],
//...
modules: [
'@nuxtjs/style-resources'
],
//You will have to add this new object if it doesn't exist already
styleResources: {
scss: ['./assets/scss/*.scss']
},
//...
}

5. Now, in your component add the bolded part to the <style> tag of your template. Now, you can use your variable to set the background-color.

<style lang="scss" scoped>
div {
background-color: $color-variable;
}
</style>

$ npm i -S vue-textarea-autosize 

2. Create a vueTextareaAutosize.js file in the /plugins folder. Import your plugin then pass it into Vue.use()

import Vue from 'vue'
import VueTextareaAutosize from 'vue-textarea-autosize'
Vue.use(VueTextareaAutosize)

3. In nuxt.config.js, add ”~plugins/vueTextareaAutosize.js” to the plugins array.

plugins: [..."~plugins/vueTextareaAutosize.js"]

4. Rebuild your application

npm run dev

Lance Watanabe

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store