View getZotero.js
async function getZotero(req) { | |
let nextBtn = document.getElementById("loadNext"); | |
let prevBtn = document.getElementById("loadPrev"); | |
let content = document.getElementById("content"); | |
let links = {}; | |
await axios.get(req).then(function(response) { | |
content.innerHTML = ''; | |
View node-sass.js
const sass = require('node-sass'); | |
const fs = require('fs'); | |
const scssFile = 'src/site/_includes/scss/style.scss'; | |
const cssFile = 'src/css/style.css'; | |
sass.render({ | |
file: scssFile, | |
sourceMap: true, | |
outputStyle: 'compressed', |
View .eleventyconfig.js
const pluginRss = require("@11ty/eleventy-plugin-rss"); | |
module.exports = function(eleventyConfig) { | |
// Lots of other stuff probably goes here | |
eleventyConfig.addCollection("allUpdates", function(collection) { | |
return collection.getFilteredByGlob(["posts/*.md", "photos/*.md", "notes/*.md"]).sort(function(a, b) { | |
return b.date - a.date; | |
}); |
View .eleventy.js
module.exports = function(eleventyConfig) { // This only happens once in your template! | |
// Blah blah, whatever other Eleventy stuff you need. | |
eleventyConfig.addLiquidShortcode("vimeo", (vimeoId, aspectRatio) => { | |
return `<div class="aspect-ratio" style="--aspect-ratio: ${aspectRatio}"><iframe src="https://player.vimeo.com/video/${vimeoId}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen class="video video--vimeo"></iframe></div>`; | |
}); | |
// Blah blah, whatever other Eleventy stuff you need. | |
View .eleventy.js
module.exports = function(eleventyConfig) { // This only happens once in your template! | |
// Blah blah, whatever other Eleventy stuff you need. | |
eleventyConfig.addLiquidShortcode("youtube", (youtubeId, aspectRatio) => { | |
return `<div class="aspect-ratio" style="--aspect-ratio: ${aspectRatio}"><iframe class="youtube-player video video--youtube" src="https://www.youtube.com/embed/${youtubeId}/" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`; | |
}); | |
// Blah blah, whatever other Eleventy stuff you need. | |
View smoothScroll.js
function smoothScroll() { | |
const internalLinks = document.querySelectorAll('a[href^="#"]'); | |
internalLinks.forEach( | |
function(currentLink) { | |
const linkHref = currentLink.getAttribute('href'); | |
currentLink.addEventListener("click", function(event) { | |
document.querySelector(linkHref).scrollIntoView({ |
View zip_folders.sh
for f in * [14:00:21] | |
do | |
zip -r "${f}.zip" "$f" | |
done |
View count.sh
COUNTER=0; | |
for files in *; | |
do | |
if test -f "$files"; then | |
LINES=`wc -l $files | awk '{print $1}'` | |
fi | |
COUNTER=`expr $COUNTER + $LINES`; | |
done |
NewerOlder