Skip to content

Instantly share code, notes, and snippets.

View nossidge's full-sized avatar

Paul Thompson nossidge

View GitHub Profile

Please CLI

pls is a CLI tool that translates natural language into shell commands.

Copilot for CLI is coming at some point, but until then here's a stupid thing I've been playing about with recently.

@nossidge
nossidge / Easiest Ever Paella
Created January 28, 2021 15:27
Welcome file
# [Easiest Ever Paella][orig]
[orig]: https://www.bbcgoodfood.com/recipes/4021/easiest-ever-paella
## Ingredients
Serves 4
require 'active_support/all'
require 'ice_cube'
start_time = Time.parse('09:00')
end_time = Time.parse('17:00')
puts start_time
puts end_time
icecube = IceCube::Schedule.new(start_time, end_time: end_time)
icecube.add_recurrence_rule IceCube::Rule.weekly.day(:sunday, :tuesday)
#!/usr/bin/env ruby
# Solution to the below question:
# https://codereview.stackexchange.com/questions/191522
# Initialise a variable to store the accumulating total.
total = 0
# Start an infinite loop. (When writing these, make sure there's a
# 'break' command somewhere within the loop, or it will loop forever)
// Save as animated GIF
// Requires gifAnimation Processing Library
// http://www.extrapixel.ch/processing/gifAnimation/
import gifAnimation.*;
GifMaker gifExport;
boolean saveToGif = false;
int gifFrameDelay = 180;
int gifFrameCount = 0;
@nossidge
nossidge / ASCII 3D
Last active December 20, 2015 22:08
Processing. My prototype of Sean Howard's 83rd game mechanic, ASCII 3D. http://www.squidi.net/three/entry.php?id=83
//
// ASCII 3D
//
// Idea by Sean Howard:
// http://www.squidi.net/three/entry.php?id=83
//
// Prototype code by Paul Thompson
//
////////////////////////////////////////////////////////////////////////////////
@nossidge
nossidge / Snowball
Last active December 15, 2015 14:09
C++ Generate valid snowball poems, using input file of example text and Markov chains to help make it grammatically correct.
/*
~~ Snowball Poem ~~
Snowball (also called a Chaterism): A poem in which each line is a single word,
and each successive word is one letter longer. One of the constrained writing
techniques invented by the Oulipo (Workshop of Potential Literature).
~~ Program Description ~~
This program takes input from the file "input-raw.txt". It examines the file for
@nossidge
nossidge / BlurredWiggleRectangle
Created March 7, 2013 15:11
BlurredWiggleRectangle
// Save as animated GIF
// Requires gifAnimation Processing Library
// http://www.extrapixel.ch/processing/gifAnimation/
import gifAnimation.*;
GifMaker gifExport;
boolean saveToGif = true;
// The time between GIF frames
int frameDelay = 50;
@nossidge
nossidge / SpinningJaggedTargets
Created March 6, 2013 17:01
SpinningJaggedTargets
// Save as animated GIF
// Requires gifAnimation Processing Library
// http://www.extrapixel.ch/processing/gifAnimation/
import gifAnimation.*;
GifMaker gifExport;
boolean saveToGif = false;
// The time between GIF frames
int frameDelay = 60;
@nossidge
nossidge / CrossOfJaggedCircles
Last active December 14, 2015 10:19
CrossOfJaggedCircles
// Save as animated GIF
// Requires gifAnimation Processing Library
// http://www.extrapixel.ch/processing/gifAnimation/
import gifAnimation.*;
GifMaker gifExport;
boolean saveToGif = false;
// The time between GIF frames
int frameDelay = 60;