Skip to content

Instantly share code, notes, and snippets.

View GaryHomewood's full-sized avatar

Gary Homewood GaryHomewood

View GitHub Profile
@GaryHomewood
GaryHomewood / poem.sh
Created April 20, 2023 14:54
Poem from random words from random wikepedia pages
#!/bin/bash
OUT=""
# @deprecated A random number of words
NUMBER_OF_WORDS=`expr "$RANDOM" % 10`
# Sentence length of 9 seems to be interesting
for i in {1..9}
do
# Get a random page
SUMMARY=$(curl -sL "https://en.wikipedia.org/api/rest_v1/page/random/summary" | jq '.["extract"]')
from PIL import Image, ImageDraw
from random import seed, random, randint
def drawCell(draw, x0, y0, sideLength, deltaX, deltaY, deltaSidelength, numberOfSquares):
"""
Draws a cell of squares
Args:
x0: start x coorodinate of cell
y0: start y coordinate of cell
@GaryHomewood
GaryHomewood / main.dart
Last active June 24, 2020 14:03
Flutter example of animated notification-style overlay
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData.light().copyWith(
import 'package:flutter/material.dart';
import 'dart:math';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Buttons',
[alias]
logs=log --pretty=format:'%C(dim white)%h%Creset - %Cgreen%an%Creset, %Cblue%ar%Creset : %C(yellow)%s%Creset' --graph
lo=log --pretty=format:'%C(#777777)%h%C(reset) %C(#0675da)%an%C(reset) %C(#7e904b)%ar%C(reset) : %C(#bbbbbb)%s%C(reset)' --graph
co=checkout
st=status
@GaryHomewood
GaryHomewood / door.ino
Last active January 4, 2018 15:56
An Arduino sketch for ESP8266 to toggle a servo via a webpage
#include "config.h"
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <Servo.h>
#define SERVO_PIN 2
ESP8266WebServer server(80);
Servo servo;
@GaryHomewood
GaryHomewood / big-rad.vim
Created July 4, 2017 13:42
A vim colour scheme for markdown
set background=dark
hi clear
syntax reset
hi Cursor guibg=#cc4455 guifg=white ctermbg=4 ctermfg=15
hi link CursorIM Cursor
hi Normal guibg=#222222 guifg=#bdbdbd gui=none ctermbg=0 ctermfg=15
hi NonText guibg=bg guifg=#bdbdbd ctermbg=8 ctermfg=14
hi Visual guibg=#557799 guifg=white gui=none ctermbg=9 ctermfg=15
@GaryHomewood
GaryHomewood / index.js
Last active July 6, 2017 15:03
API for:Top 30 stories from Hacker News + url page content
const { send } = require('micro')
const { router, get } = require('microrouter')
const fetch = require('node-fetch')
const url = require('url')
const topStories = async(req, res) => {
res.setHeader('Access-Control-Allow-Origin', '*')
const topStories = await fetch('https://hacker-news.firebaseio.com/v0/topstories.json')
const json = await topStories.json()
const items = json.slice(0, 30).map(id => {
@GaryHomewood
GaryHomewood / cal.css
Last active July 8, 2016 08:23
Stylish calendar.google.com
@import 'https://fonts.googleapis.com/css?family=Source+Sans+Pro';
body,
.st-c-pos {
font-family: 'Source Sans Pro', sans-serif;
}
body {
border-top: 4px solid #267212;
background-color: #f8f8f8;
padding-top: 10px;
}

The New Book Club Manifesto

Abstract

The modern book club usually involves some kind of consensus decision of a book worth reading, and a discussion of the book at the subsequent meeting. The New Book Club is intended to replace this book selection process.

Aims

To share and highlight the methods of book discovery.
To ensure readers are not obliged to read things they aren't interested in.