Skip to content

Instantly share code, notes, and snippets.

View dcchambers's full-sized avatar
🚀
happy engineers == productive engineers

Dakota Chambers dcchambers

🚀
happy engineers == productive engineers
View GitHub Profile
@dcchambers
dcchambers / gist:7508ffd0f4e540d38949305303549598
Created February 22, 2024 21:49 — forked from dvliman/gist:10402435
ruby $ global variable
$: (Dollar Colon) is basically a shorthand version of $LOAD_PATH. $: contains an array of paths that your script will search through when using require.
$0 (Dollar Zero) contains the name of the ruby program being run. This is typically the script name.
$* (Dollar Splat) is basically shorthand for ARGV. $* contains the command line arguments that were passed to the script.
$? (Dollar Question Mark) returns the exit status of the last child process to finish.
$$ (Dollar Dollar) returns the process number of the program currently being ran.
$~ (Dollar Tilde) contains the MatchData from the previous successful pattern match.
$1, $2, $3, $4 etc represent the content of the previous successful pattern match.
$& (Dollar Ampersand) contains the matched string from the previous successful pattern match.
$+ (Dollar Plus) contains the last match from the previous successful pattern match.
$` (Dollar Backtick) contains the string before the actual matched string of the previous successful pattern match.
@dcchambers
dcchambers / flappy.html
Created November 30, 2020 16:20 — forked from gullyn/flappy.html
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@dcchambers
dcchambers / setup.sh
Created June 29, 2020 20:28 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@dcchambers
dcchambers / docker-nuke-safely
Last active December 6, 2019 19:58 — forked from n3r0-ch/docker-nuke
Docker Nuke (Safely) 🐳💣- Clean up your Docker environment in a (sort of) safe way!
#!/bin/bash
#Check if user is root
if [ $UID != 0 ]; then
echo "You need to be root to use this script."
exit 1
fi
echo "docker-nuke-safely exists to do one thing; clean up your Docker environment. It's not called docker-carefully-and-nicely-spritz-up. Be careful!"
echo
@dcchambers
dcchambers / gist:2fec926614efe24d4f91ad0513180165
Created March 9, 2018 17:38 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: