Skip to content

Instantly share code, notes, and snippets.

Avatar

Praneet Loke praneetloke

View GitHub Profile
@praneetloke
praneetloke / upload-files-az-storage.ps1
Created Oct 10, 2018
A PowerShell script to upload a folder to a blob container in an Azure Storage account.
View upload-files-az-storage.ps1
Param(
[string]$storageAccountName = "the_default_storage_account_name",
[string]$containerName = "the_default_container_name",
[string]$resourceGroupName = "your_default_resource_group_name",
[int] $maxAge = 86400,
[int] $indexMaxAge = 3600,
[boolean]$isProductionBuild = $false,
[boolean]$skipBuild = $false,
[boolean]$isAzurePipelineBuild = $false,
[string]$localFolder = ".\dist"
@praneetloke
praneetloke / projects_script.vue
Created Oct 10, 2018
The javascript portion of the Projects component for Net Your Problem.
View projects_script.vue
<script>
import axios from 'axios';
import VueMarkdown from 'vue-markdown';
import Card from './material-components/Card';
import ScrollDownToSection from './ScrollDownToSection';
import Timeline from './Timeline';
import SimpleModal from './dialogs/SimpleModal';
const contentRepositoryApiBaseUrl = process.env.CONTENT_REPOSITORY_API_BASE_URL;
@praneetloke
praneetloke / projects.vue
Created Oct 9, 2018
Net Your Problem - Projects section template
View projects.vue
<template>
<section class="projects">
<div class="content">
<div class="mdl-typography--text-center section-title">
<h4>Projects</h4>
</div>
<div class="cards-wrapper">
<div class="cards-container">
<card v-for="(project, index) in projects" :key="index">
<div slot="title">
@praneetloke
praneetloke / inline-component-App.vue
Last active Jun 9, 2018
Inline rendering of a custom component
View inline-component-App.vue
<template>
<div id="app">
<img src="./assets/logo.png">
<div v-show="showMessage">{{message}}</div>
<div v-show="items.length > 0">I like</div>
<ul>
<li v-for="(item, index) in items" v-bind:key="index">{{item}}</li>
</ul>
<router-view/>
<!--This is what we declared as the tag for our custom component-->
@praneetloke
praneetloke / default-router-index.js
Created Jun 9, 2018
The default router created by the CLI
View default-router-index.js
import Vue from 'vue';
import Router from 'vue-router';
import HelloWorld from '@/components/HelloWorld';
Vue.use(Router);
export default new Router({
routes: [
{
// this component is loaded when the site is loaded first. '/' represents the root-URL
@praneetloke
praneetloke / TestComponent.vue
Last active Jun 9, 2018
A custom component
View TestComponent.vue
<template>
<div>Test</div>
</template>
<script>
export default {
name: 'TestComponent',
};
</script>
<style>
</style>
View HelloWorld.vue
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<h2>Essential Links</h2>
<ul>
<li>
<a
href="https://vuejs.org"
target="_blank"
>
@praneetloke
praneetloke / index.js
Last active Jun 9, 2018
The default router created by the vue-cli
View index.js
import Vue from 'vue';
import Router from 'vue-router';
import HelloWorld from '@/components/HelloWorld';
import TestComponent from '@/components/TestComponent';
Vue.use(Router);
export default new Router({
routes: [
{
@praneetloke
praneetloke / App.vue
Last active Jun 9, 2018
The default App.vue created by vue-cli for a new webpack-based project
View App.vue
<template>
<div id="app">
<img src="./assets/logo.png">
<div v-show="showMessage">{{message}}</div>
<div v-show="items.length > 0">I like</div>
<ul>
<li v-for="(item, index) in items" v-bind:key="index">{{item}}</li>
</ul>
<router-view/>
</div>
@praneetloke
praneetloke / main.js
Created Jun 7, 2018
The default main.js file created by vue-cli for a new project
View main.js
import Vue from 'vue';
import App from './App';
import router from './router';
Vue.config.productionTip = false;
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
You can’t perform that action at this time.