Skip to content

Instantly share code, notes, and snippets.

@garethredfern
garethredfern / getSiteMeta.js
Created September 16, 2020 19:46
The full getSiteMeta function for a Nuxt website, including social media and SEO tags.
const type = "website";
const url = "https://bobross.com";
const title = "My Amazing Blog on The Joy of Painting";
const description = "Articles focused on the beautiful art of landscape painting.";
const mainImage = "/a-lovely-image.png";
export default (meta) => {
return [
{
hid: "description",
@johnhalsey
johnhalsey / Pagination.vue
Created July 15, 2019 08:56
VueJS Pagination with TailwindCSS
<template>
<div class="">
<ul v-if="pages" class="list-reset">
<li class="inline-block bg-white hover:bg-blue-lightest border mr-1">
<a href="#"
class="no-underline text-grey-darker block py-3 px-4"
:class="{'bg-grey-lightest text-grey cursor-not-allowed': currentPage == 1}"
@click.prevent="getPreviousPage">Previous</a>
</li>
<li v-for="(page, index) in range"
@jazlopez
jazlopez / crontab-git-update.sh
Created October 25, 2016 00:14
Git pull inside root crontab
# Git repository may not allow root to pull down updates
# Pull updates where $user is allowed to read/write remote.
# command line:
su -s /bin/sh $user -c 'cd /var/www/html/src && /usr/bin/git pull origin master'
# crontab (by executing sudo opens up root crontab)
sudo crontab -e
# every 1 minute pull changes (if any)
*/1 * * * * su -s /bin/sh $user -c 'cd /var/www/html/src && /usr/bin/git pull origin master'