This Gist supports this YouTube video:
https://www.youtube.com/watch?v=rnZYaQ7BfT8
from the YouTube playlist "Rick is Playing With Unix"
This Gist supports this YouTube video:
https://www.youtube.com/watch?v=rnZYaQ7BfT8
from the YouTube playlist "Rick is Playing With Unix"
This code was originally posted by Jens in:
https://developer.apple.com/forums/thread/5137
He writes "Below is the 'Webkit Browser in 30 Lines of Swift' from Practical Swift, with some small changes to make it run on latest beta with Swift 2."
I have modified it to work on MacOS Big Sur 11.7.4 Swift 5.5.2
# Wordle - https://www.powerlanguage.co.uk/wordle/ | |
# This little program looks up a suitable word given | |
# state of the puzzle (from 2022-Jan-19) | |
# RAISE | |
# BLIMP | |
# CHICK | |
# SWIPE | |
# UNIFY |
This is me just parsing an encoded message.
#!/usr/bin/python | |
import argparse | |
import os | |
import random | |
import re | |
import subprocess | |
from datetime import date | |
parser = argparse.ArgumentParser(description='Reads random diary entries', epilog='If --old or --today or --thisday present, any day arguments are ignored') | |
group = parser.add_mutually_exclusive_group() |
# This bash function makes a diary command. | |
# All diary entries are kept in $HOME/diary. Each diary file represents a day | |
# and the filename is YYYYMMDD.txt | |
# Each diary entry is preceded by a timestamp. If the diary file doesn't exist, | |
# the command first makes the diary file, then it appends the timestamp. If the | |
# diary file exists, then it only appends the timestamp. | |
# The diary file is edited by vim. | |
diary () { | |
filename=$HOME/diary/`date +"%Y%m%d.txt"`; | |
if [ ! -f $filename ]; then |
Some code to create classic HTML redirect pages. For reference, see:
https://www.w3docs.com/snippets/html/how-to-redirect-a-web-page-in-html.html
#!/usr/bin/env ruby | |
# | |
require 'pp' | |
require 'optparse' | |
require 'pry' | |
options={} | |
options[:verbose] = false | |
options[:figures_list] = 'master_figure_list.csv' |
#!/usr/bin/php | |
<?php | |
// Created for Boston PHP's 200 Days of Code (4/22/2015). | |
// | |
// http://www.meetup.com/bostonphp/events/219831339/ | |
// | |
// See: https://php.net/manual/en/function.wordwrap.php | |
// | |
$body1 = <<<EOF |