My talk at Ruby on Rails Oceania in Melbourne slides
TDD Yourself And Make An Awesome Github Landing Page
You don’t need anything to start TDD
if True; then
echo 'yolo'
fiπ
if curl -s -N 'https://github.com/terry-d-4tw/' | grep -q "I’m currently working on HolyC"; then
echo "it worked! 🎉"; else
echo "it did not work 😔";
fi
Note:
Be careful with emojies.
And do not get too emotional with `!!!`
Return meaningful exitcodes
if curl -s -N 'https://github.com/terry-d-4tw/' | grep -q "I’m currently working on HolyC"; then
echo "it worked! 🎉"; exit 0; else
echo "it did not work 😔"; return 1
fi
# machines do not understand your emojies,
# unless it is an emojicode 🍇
FAIL MESSAGE
FAIL=$(curl -s https://i.imgur.com/Afil0Do.png | imgcat)
https://github.com/eddieantonio/imgcat - it’s like
cat
, but for images😽
SUCCESS MESSAGE
SUCCESS=$(curl -s https://avatars.steamstatic.com/e924aab1db76fe96f490b51eeed2893571c5d41b_full.jpg | imgcat)
if curl -s -N 'https://github.com/terry-d-4tw/' | grep -q "I’m currently working on HolyC"; then
echo $SUCCESS; return 0; else
echo $FAIL; return 1
fi
or with caching html
WEBSITE_CACHE=$(curl https://github.com/terry-d-4tw/)
if echo $WEBSITE_CACHE | grep -q "ASSERTION"; then
echo $SUCCESS; return 0; else
echo $FAIL; return 1;
fi
CI/CD it via GitHub Action Workflow
if curl -s -N 'https://github.com/terry-d-4tw/' | grep -q "I love Ruby too"; then
echo "it worked! 🎉"; exit 0; else
echo "it did not work 😔"; exit 1
fi
Cool stats for the README.md https://github-readme-stats.vercel.app/
![Terry's GitHub stats](https://github-readme-stats.vercel.app/api?username=terry-d-4tw&show_icons=true&theme=synthwave)
Create a GitHub page
Settings -> Pages
Source / Branch: your_master_branch
https://github.com/terry-d-4tw/terry-d-4tw/settings/pages
Add JAMStack Framwork
Jekyll
create
_config.yml
with:
theme: minima
Thank you for reading
Leave a comment