Skip to content

Instantly share code, notes, and snippets.

View pelarejo's full-sized avatar
🚀

Pelayo PAREJO PAGADOR pelarejo

🚀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am Py0s on github.
  • I am pyos (https://keybase.io/pyos) on keybase.
  • I have a public key whose fingerprint is 61DB 4972 F463 FF63 C7A4 9F3C D817 1EC9 471E 5F11

To claim this, I am signing this object:

@pelarejo
pelarejo / yardoc_cheatsheet.md
Created December 11, 2017 10:28 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@pelarejo
pelarejo / pry_cheat_sheet.md
Last active April 10, 2018 09:39 — forked from Nefor/Pry Cheat Sheet
Pry Cheat Sheet

PRY CHEATSHEET

local_variables instance_variables

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session
@pelarejo
pelarejo / test_logs.py
Last active July 10, 2019 16:08
PyTest UnitTest Logs
import logging
class LogTestCase(TestCase):
@pytest.fixture(autouse=True)
def inject_fixtures(self, caplog):
self._caplog = caplog
def test_loggin(self):
# do stuff
{
"status": 500,
"error": "Internal Server Error",
"exception": "#<NoMethodError: undefined method `to' for nil:NilClass>",
"traces": {
"Application Trace": [
{
"exception_object_id": 18180,
"id": 2,
"trace": "app/controllers/graphql_controller.rb:6:in `block in <class:GraphqlController>'"