Skip to content

Instantly share code, notes, and snippets.

View asierrayk's full-sized avatar

Asier Cardoso Sánchez asierrayk

View GitHub Profile
# https://github.com/PyCQA/pydocstyle/blob/master/docs/snippets/pre_commit.rst
- repo: https://github.com/pycqa/pydocstyle
rev: 5.0.2 # pick a git hash / tag to point to
hooks:
- id: pydocstyle
# https://github.com/PyCQA/pydocstyle/blob/master/docs/snippets/cli.rst
args:
- --convention=google
# http://www.pydocstyle.org/en/5.0.1/error_codes.html
- |-
@asierrayk
asierrayk / kill process using port 8000
Created January 29, 2020 08:15
Kill process using a specific port
sudo kill -9 `sudo lsof -t -i:8000`
@asierrayk
asierrayk / vimgrep
Created January 21, 2020 11:43
How to use vimgrep
:vimgrep /word_to_search/j folder_to_search/**/*.extension_of_file
:copen
@asierrayk
asierrayk / commit_from_server.sh
Created February 8, 2018 12:08
Git commit specifying email and name only for the current commit
git -c user.email="" -c user.name="" commit -m "Commmit message"
@asierrayk
asierrayk / Django_check_database.py
Created January 29, 2018 16:02
Check current database used django. python manage.py shell
from django import db
db.connections.databases
@asierrayk
asierrayk / list_tables.sql
Created January 18, 2018 09:14
PostgreSQL list tables (django)
SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_schema='public';
@asierrayk
asierrayk / widget.kv
Created January 11, 2018 22:51
Debug widget kivy
<Widget>:
canvas.after:
Line:
rectangle: self.x+1,self.y+1,self.width-1,self.height-1
dash_offset: 5
dash_length: 3