Skip to content

Instantly share code, notes, and snippets.

View libbyschuknight's full-sized avatar
🏡
Working remotely

Libby Schumacher-Knight libbyschuknight

🏡
Working remotely
View GitHub Profile
RACK_ENV=test bundle exec rake db:migrate
change_column :products, :discount_percentage, :decimal, precision: 5, scale: 2
@libbyschuknight
libbyschuknight / rake_task
Created October 4, 2015 20:58
Generate rake task
rails g task check_files check_dir import_file
{
"word_separators": "./\\()\"'-:,.;<>~@#$%^&*|+=[]{}`~"
}
###########################
# Configuration for rubocop
# in .rubocop.yml
# Most of these are disabling existing cops, primarily
# due to a smattering of different styles and loose
# guidlines for contributions.
#
# Any of these may be changed.
@libbyschuknight
libbyschuknight / rspec
Created August 29, 2015 09:39
rspec stuff
have rpsec format as 'documentation
https://www.relishapp.com/rspec/rspec-core/v/2-4/docs/command-line/format-option
run from terminal
$ rspec spec --format documentation
add to .rspec file so tests are always in this format
--format documentation
Nyan Cat - just for fun!
@libbyschuknight
libbyschuknight / git_tags
Created August 27, 2015 00:43
Adding and pushing tags in Git
git tag slice02
git push origin --tags
@libbyschuknight
libbyschuknight / python_server_command
Created August 20, 2015 22:42
Command for running python sever, use 3005
python -m SimpleHTTPServer 3005
@libbyschuknight
libbyschuknight / API_documentation_example.md
Last active August 29, 2015 14:27
example API documentation layout

[GET] list of users

  • returns list of user objects includes id, name, username, email, and bio
  • /api/v1/users/
  • example: [ { "id": 1, "username": "genevieve_hauck", "email": "[email protected]", "name": "Patience Ondricka", "bio": "Assumenda laudantium delectus similique aspernatur quibusdam quasi recusandae. Blanditiis repudiandae fuga fugiat. Ab non qui." }, { "id": 2, "username": "laurie.hermann", "email": "[email protected]", "name": "Mr. Taurean Schneider", "bio": "Dolor architecto iusto. Maxime et ab enim neque ratione. Non molestias quisquam qui sunt iure et. Tenetur eum repellat autem et est ipsam." } ]

[GET] list of articles

  • returns list of article objects. Includes id, user_id, title, body.
  • /api/v1/articles/
  • example: [ { "id": 1, "title": "nam", "body": "Autem deleniti maiores et ut. Possimus nihil ut laboriosam eos. Deserunt excepturi dignissimos dolorem velit fuga iure. Voluptate consequatur recusandae. Dolorum inventore rerum animi voluptatem natus.", "user_id