Bash scripts kept in the home directory or another place that's logical for them specifically.
history | grep whatever (or other useful piping), though your older commands are forgotten eventually. You can mess with the values of HISTSIZE and HISTFILESIZE environment variables in your system.