Skip to content

Instantly share code, notes, and snippets.

<?php
function array_to_sentence($arr)
{
$s = "";
if (count($arr) === 1) {
$s = $arr[0];
} elseif (count($arr) === 2) {
$s = $arr[0] . " and " . $arr[1];
} else {
$slice = array_slice($arr, 0, count($arr) - 1);
@awesomephant
awesomephant / .eleventy.js
Created May 6, 2023 09:03
Eleventy files for Ollie
const pluginRss = require("@11ty/eleventy-plugin-rss");
const markdownIt = require("markdown-it");
const replacements = require("./_data/replacements.json");
const Image = require("@11ty/eleventy-img");
const path = require("path");
const colors = require('colors');
const md = new markdownIt({
breaks: true,
});
@awesomephant
awesomephant / makeUploadFolders.js
Created January 11, 2022 11:36
Seafile Scripts
const axios = require("axios");
const fs = require("fs")
const baseURL = "https://seafile.rlp.net"
let allUploadLinks = [];
let config = {
headers: {
"Authorization": "Token 565d9012b6c134e37233fb64172f6223fb584197",
'Accept': 'application/json; indent=4',
'Content-Type': 'application/x-www-form-urlencoded',
@awesomephant
awesomephant / sharer-links.txt
Created August 23, 2021 10:31
Templates for pure HTML social share links
set history=500
filetype plugin on
filetype indent on
set autoread
set tabstop=2
set shiftwidth=2
set expandtab
set showmatch
@awesomephant
awesomephant / map-style.json
Created April 27, 2021 14:08
Black and White Map Style
[
{
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Delectus sit quibusdam rem quaerat, laboriosam voluptas
accusantium animi sint et itaque doloremque saepe. Consectetur fugiat ipsa numquam aperiam asperiores aliquam
adipisci ad! Velit est nam pariatur eum explicabo perferendis unde nobis.</p>
<button class="more">More</button>
<div class="hidden">
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Delectus sit quibusdam rem quaerat, laboriosam voluptas
accusantium animi sint et itaque doloremque saepe. Consectetur fugiat ipsa numquam aperiam asperiores aliquam
adipisci ad! Velit est nam pariatur eum explicabo perferendis unde nobis.</p>
@awesomephant
awesomephant / index.html
Created February 9, 2020 17:01
Kat's site
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kat's cool websiteee</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 class='name'>Kat Mcgrath</h1>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
@awesomephant
awesomephant / bp.scss
Created May 26, 2019 12:04
Sass breakpoint mixin
@mixin bp($point) {
@if $point==xl {
@media (min-width: 85rem) {
@content;
}
}
@else if $point==l {
@media (min-width: 70rem) {
@content;
}