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