Skip to content

Instantly share code, notes, and snippets.

View robertfairley's full-sized avatar

Robert Fairley robertfairley

View GitHub Profile
@robertfairley
robertfairley / A Quick Blog in Golang.md
Last active September 1, 2020 16:26
quick markdown blog write-up

I'll have to update this description at another time, but in short these are the relevant files, configs, and scripts for deploying a very simple blog using Golang.

To get started, make a folder, add all of these files to a directory and create necessary directories to fit a structure like so (ignoring everything but the files in this Gist for now) :

.
├── LICENSE # (Github or MIT)
├── Makefile
├── README.md
├── posts
@robertfairley
robertfairley / set-reader-style.js
Created December 22, 2018 20:11
Quick function to use in dev tools to improve reading experience on old HTML articles/papers
/**
* Gives the browser window a better midly altered reading view for
* pages that use unaltered styles for margin, etc. Limits line length,
* slightly reduces contrast, increases line height. Great for old HTML
* formatted research papers.
*
* @param {number?} level - Set the level of the contrast. Defaults to 0.
* @returns {boolean} - True if the function succeeds, false if not.
*/
function setReaderStyles(level = 0) {
@robertfairley
robertfairley / hex
Created May 18, 2018 19:54
Shorthand for POSIX `hexdump` standard output
#!/usr/bin/env bash
##################################################
# #
# Shorthand for a hex dump of a file on POSIX #
# if the program exists on your system #
# #
##################################################
FILE=$1
@robertfairley
robertfairley / README.md
Last active May 5, 2018 02:01 — forked from kristopolous/hn_seach.js
hn job query search

HN Job Query

for "Who's Hiring"

Conveniently query HackerNews 'Who's Hiring' posts for relevant positions using a console function in Chrome.


Usage

Add these files to a folder and load the folder as an unpacked extension in Chrome. If you don't know how to load an unpacked extension, follow these instructions:

@robertfairley
robertfairley / README.md
Last active November 8, 2017 04:13
A very basic typescript app generator

ts-init

A very basic typescript app generator. Builds a bare-bones basic set of files for a TypeScript front-end web app.


Install

Copy and paste this code to a file in your PATH without any extension, or remove the hashbang and run with Python.

Requirements

This script will work on macOS and Linux systems with Python and NodeJS installed.

#!/usr/bin/env python
import sys
import subprocess
# GLOBALS
PROMPT = "[ ES5 INIT ]"
TITLE = ""
CSS = ""

Keybase proof

I hereby claim:

  • I am robertfairley on github.
  • I am 526f62 (https://keybase.io/526f62) on keybase.
  • I have a public key ASAMkkfQ7n59-oVrgVGcpynviydbc5CHeL8A3efJd_nywAo

To claim this, I am signing this object: