A collection of resources, cheatsheets and code snippets I found helpful (or kept forgetting) during my Flatiron Software Engineering bootcamp.
HEY FRIENDS! This repo/resource is a perpetual work in progress. I'm not sure how big I want to expand it, but had a thought to include some resources I am gathering for my own knowledge. I'm open to suggestions or contributions.
- What is the difference between
find
,find_by
&find_by_id
? - Sessions
- RESTful routes
- Atom packages
Resources recommended by others in the community.
- AlgoExpert
- BaseCS Podcast
- Binary Search Trees | Data Structures in JavaScript
- binarysearch.io
- The Coding Interview Bootcamp: Algorithms + Data Structures
- Cracking The Code Interview
- Daily Coding Problem
- De-Coding The Technical Interview Process
- HackerRank: Algorithms
- HackerRack: Data Structures
- JavaScript Algorithms and Data Structures Certification
- JavaScript Algorithms and Data Structures Masterclass
- The Working Developer's Guide To Algorithms
Run the following code to have bundler create a new Ruby project for you
bundler gem name_of_your_project_repo
A hidden input for editing or deleting data with a form
<input type="hidden" name="_method" value="patch">
git branch -d BRANCHNAME
git checkout --orphan NEWBRANCH
git rm -rf .
Open a new website for scraping
Nokogiri:HTML(open("http://www.example.com"))
See a list of all available Rake tasks.
Rake -T
- Within the
db
folder, create a file namedseeds.rb
. - Create object instances. For example:
Dog.create(:name => "Fido", :breed => "mutt")
. Usingcreate
as opposed tonew
creates the Ruby object and saves it to the database - Run
rake db:seed
Resources I have referenced or others have referenced
- The Bastards Book of Ruby
- DigitalOcean: How to Code in Ruby
- Dissecting my Ruby Project Skeleton
- The Odin Project
- Rubular: a Ruby regular expression editor
- Ruby Guides
- Why’s (Poignant) Guide to Ruby
Substitute a character in a string for another character
string.gsub("character-to-target","character-to-replace")
- Bcrypt. An easy way to keep your users' passwords secure.
- Bundler.Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.
- Corneal. A Ruby gem that is a Sinatra app generator with Rails-like simplicity
- Faker. A library for generating fake data such as names, addresses, and phone numbers.
- Nokogiri. Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
- Rake. Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.
- Shotgun. This is an automatic reloading version of the rackup command that's shipped with Rack.
- Tux. Tux dresses up sinatra in a shell. Use it to interact with your helpers, view rendering and your app's response objects.
Open an item or folder in a specific application
application .
For example, to open a folder in Atom, you would use this command
atom .
Clear the terminal window
clear
Create a new file
touch file-name.txt
Create a new directory
mkdir directory-name
Create a new branch and switch to it
git checkout -b branch-name
Create an alert box. Reference: https://stackoverflow.com/questions/50544499/how-to-make-a-styled-markdown-admonition-box-in-a-github-gist
| WARNING: Don't do the thing! |
| --- |