Skip to content

Instantly share code, notes, and snippets.

View grantcodes's full-sized avatar

Grant Richmond grantcodes

View GitHub Profile
@grantcodes
grantcodes / windows-setup.ps1
Last active August 21, 2021 13:00
A script to help setting up windows
# Description: Boxstarter Script
# Author: grant.codes
# Inspired by https://github.com/microsoft/windows-dev-box-setup-scripts
# Install at http://boxstarter.org/package/url?https://gist.githubusercontent.com/grantcodes/a31ee0b151da1f6304a756260a95bb45/raw/windows-setup.ps1
#---- TEMPORARY ---
Disable-UAC
#--- Fonts ---
choco install cascadiacode -y
@grantcodes
grantcodes / micropub.har
Created March 18, 2020 11:11
HAR file of some test micropub requests
{
"log": {
"version": "1.2",
"creator": {
"name": "Insomnia REST Client",
"version": "insomnia.desktop.app:v7.1.1"
},
"entries": [
{
"startedDateTime": "2020-03-18T11:07:31.832Z",
@grantcodes
grantcodes / indieweb-blocks.js
Created October 16, 2019 23:22
A very quick demo of potential IndieWeb support for gutenberg blocks
// Basic in-reply-to block mvp
/**
* BLOCK: indieweb-blocks
*
* Registering a basic block with Gutenberg.
* Simple block, renders and saves the same content without any interactivity.
*/
// Import CSS.

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

I'll always do my best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. I’ve no desire to trick you into signing something that you might later regret. What I do want is what’s best for both parties, now and in the future.

@grantcodes
grantcodes / token-endpoint.js
Created August 21, 2018 17:36
A kind of basic token endpoint as an express router (won't actually work for you without some tweaks)
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const request = require('request');
const jwt = require('jsonwebtoken');
const qs = require('querystring');
const config = require('../config');
const router = express.Router({
caseSensitive: true,
@grantcodes
grantcodes / rel-scraper.js
Last active October 30, 2017 23:02
Simple function to get all rel links from a html string
export default function (htmlString, url) {
let rels = {};
let baseUrl = url;
const doc = new DOMParser().parseFromString(htmlString, 'text/html');
const baseEl = doc.querySelector('base[href]');
const relEls = doc.querySelectorAll('[rel][href]');
if (baseEl) {
const value = baseEl.getAttribute('href');

Keybase proof

I hereby claim:

  • I am terminalpixel on github.
  • I am terminalpixel (https://keybase.io/terminalpixel) on keybase.
  • I have a public key ASBtunpo3akFcxP9-UMdCX8fs5pkoJpbToQQMpSh5xFQ3Ao

To claim this, I am signing this object:

@grantcodes
grantcodes / .cVimrc
Last active November 25, 2015 15:37
My .cVimrc file
let defaultengine = "duckduckgo"
let blacklists = ["http://agar.io/*", "http://feedly.com/*", "https://feedly.com/*", "https://inbox.google.com/*", "https://gmail.com/*"]
@grantcodes
grantcodes / dundeemakerspace-linux-setup.sh
Last active November 10, 2015 00:04
The setup script for Dundee MakerSpace standard Lubuntu install
#! /bin/bash
# Add PPAs {
#
# chrome
#
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@grantcodes
grantcodes / Brewfile
Created November 3, 2015 14:23
My Brew Setup
tap 'caskroom/cask'
tap 'homebrew/bundle'
tap 'homebrew/versions'
tap 'mopidy/mopidy'
tap 'neovim/neovim'
brew 'calc'
brew 'fish'
brew 'node'
brew 'keybase'
brew 'midnight-commander'