Skip to content

Instantly share code, notes, and snippets.

View Livin21's full-sized avatar
💻
Coding

Livin Livin21

💻
Coding
View GitHub Profile
@Livin21
Livin21 / cacheStore.js
Last active July 26, 2020 09:00
A redis cache middleware written for express
/**
* Copyright (c) 2020
* A redis cache middleware written for express
* If the cache middleware is hooked to the express route
* - Checks if request response was cached
* - Redis key is SHA256 of req.originalUrl
* - if cache hit, sends cached data
* - if cache miss, calls next()
* - The second middleware listens for req.send event and caches res.body for 200 status
* Usage:
@Livin21
Livin21 / (Buildable Frontend Projects) bitbucket-pipelines.yml
Last active January 24, 2020 04:33
Ultron - Riafy Deployment Management Tool
image: samueldebruyn/debian-git
pipelines:
branches:
master:
- step:
caches:
- node
script:
- apt-get update
- apt-get -qq install curl
<template>
<div class="hello">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<h1>{{ msg }}</h1>
<ul>
<li v-for="mem in members">
<p class="w3-card-2 w3-center">
<!-- profile image -->
<img class="round-profile-image" :src="mem.image"/><BR /><BR />
<template>
<div class="hello">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<h1>{{ msg }}</h1>
<ul>
<li v-for="mem in members">
<p class="w3-card-2 w3-center">
<!-- profile image -->
<img class="round-profile-image" :src="mem.image"/><BR /><BR />
@Livin21
Livin21 / script
Created September 18, 2017 04:34
<script>
import mems from '../assets/members.json'
export default {
name: 'founders',
data () {
return {
msg: 'Team',
members: mems
}
}
<template>
<div class="hello">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<h1>{{ msg }}</h1>
<ul>
<li v-for="mem in members">
<p class="w3-card-2 w3-center">
<!-- profile image -->
<img class="round-profile-image" :src="mem.image"/><BR /><BR />
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<h2>Essential Links</h2>
<ul>
<li><a href="https://vuejs.org" target="_blank">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank">Twitter</a></li>
<br>
<template>
<div id="app">
<img src="./assets/logo.png">
<hello></hello>
</div>
</template>
<script>
import Hello from './components/Hello'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>myapp</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',