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)
#!/usr/bin/env ruby
#encoding: UTF-8
# http://www.gamefaqs.com/snes/563538-chrono-trigger/faqs/31563
################################################################################
# Input: 'Paris in the Spring '
# Output: 'Paris in the Spring '
class String
@nossidge
nossidge / ScratchyLines
Created April 21, 2014 15:17
Naturalistic cross-hatching effect
// Scratchy rectangle shapes.
// Lines with origin and destination points that are subtly randomised around a point.
// Creates a naturalistic cross-hatching effect.
// Save as animated GIF
// Requires gifAnimation Processing Library
// http://www.extrapixel.ch/processing/gifAnimation/
import gifAnimation.*;
@nossidge
nossidge / bandNameGen.bash
Created March 3, 2014 00:43
Emo band name / album title generator
#!/bin/bash
<<COMMENT1
This is the kind of bullshit I'm going for:
http://en.wikipedia.org/wiki/List_of_songs_recorded_by_My_Chemical_Romance
COMMENT1
############################################################################
@nossidge
nossidge / no_longer_a_place.bash
Created February 3, 2014 16:02
"no longer a place for"
#!/bin/bash
# http://www.independent.co.uk/news/uk/politics/house-of-lords-is-no-longer-a-place-for-fine-dining-peers-gripe-9102580.html
places=(
"House of Lords"
"Angel of the North"
"Jubilee Line"
"Wembley Stadium"
"Canterbury Cathedral"
"Bridge on the River Kwai"
// 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
//
////////////////////////////////////////////////////////////////////////////////