Skip to content

Instantly share code, notes, and snippets.

View zackproser's full-sized avatar
💭
Studying 📖

Zack Proser zackproser

💭
Studying 📖
View GitHub Profile
@zackproser
zackproser / add-mit-license.sh
Created March 13, 2021 00:09
Demonstrate adding an MIT license with the correct current year
#!/usr/bin/env bash
YEAR=$(date +"%Y")
FULLNAME="Gruntwork, LLC" # Replace with your company's name!
function create_license {
cat << EOF > LICENSE.txt
MIT License
Copyright © $YEAR, $FULLNAME
const glob = require('glob')
const path = require('path')
var getDynamicRoutes = function() {
return [].concat(
glob
.sync('*.md', { cwd: 'posts/' })
.map((filepath) => `/software/${path.basename(filepath, '.md')}`),
glob
.sync('*.md', { cwd: 'blog/' })
<template>
<b-carousel id="carousel1"
style="color: #000;"
:interval="6000"
v-model="slide"
@sliding-start="onSlideStart"
@sliding-end="onSlideEnd"
>
<testimonial-card
v-for="testimonial in testimonials"
<template>
<section :class="`section pb-0 bg-gradient-${this.getClassType()}`">
<div class="row row-grid">
<div class="col">
<div
class="container card card-lift--hover shadow border-0 mt-5"
>
<div class="row">
<h2 class="display-2 m-5">
{{ post.attributes.title }}
<template>
<div class="col-lg-4">
<div class="card card-list--hover shadow border-0">
<div class="card-body py-5">
<img
:src="`/${post.attributes.image}`"
class="img-fluid shadow mb-5"
/>
<nuxt-link :to="`/software/${post.slug}`">
<h6 :class="`text-${ct} display-4 text-uppercase`">
<template>
<div class="col-lg-4">
<div class="card card-list--hover shadow border-0">
<div class="card-body py-5">
<img
:src="`/${post.attributes.image}`"
class="img-fluid shadow mb-5"
/>
<nuxt-link :to="`/software/${post.slug}`">
<h6 :class="`text-${ct} display-4 text-uppercase`">
import Vue from 'vue'
Vue.mixin({
methods: {
getClassType () {
let c = [
'default',
'primary',
'info',
'success',
<template>
<section :class="`section pb-0 bg-gradient-${this.getClassType()}`">
<div class="container">
<div class="row row-grid" v-for="i in Math.ceil(posts.length / 3)" :key="i">
<post-card v-for="post in posts.slice((i - 1) * 3, i * 3)" v-bind:key="post.slug" :prefix="prefix" :post="post" :ct="getClassType()"></post-card>
</div>
</div>
</section>
</template>
{
build: {
/*
** You can extend webpack config here
*/
extend(config, ctx) {
config.module.rules.push({
test: /\.md$/,
include: [path.resolve(__dirname, 'posts'), path.resolve(__dirname, 'blog')],
loader: 'frontmatter-markdown-loader'
<template>
<div>
<exhibit prefix="software" :slug="slug" :posts="posts" />
</div>
</template>
<script>
import Exhibit from '~/components/Exhibit.vue'
export default {