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.
| /* | |
| ~~ 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 |
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.
| # [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; |
| // | |
| // ASCII 3D | |
| // | |
| // Idea by Sean Howard: | |
| // http://www.squidi.net/three/entry.php?id=83 | |
| // | |
| // Prototype code by Paul Thompson | |
| // | |
| //////////////////////////////////////////////////////////////////////////////// |
| // 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; |
| // 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; |
| // 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; |