Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
write code for humans

Naveen Yadav navyad

💻
write code for humans
View GitHub Profile
@johtso
johtso / gist:5881137
Last active Jun 14, 2019
Django Rest Framework underscore <-> camelcase conversion
View gist:5881137
import re
from rest_framework import serializers, renderers, parsers
class JSONRenderer(renderers.JSONRenderer):
def render(self, data, *args, **kwargs):
if data:
data = recursive_key_map(underscore_to_camelcase, data)
return super(JSONRenderer, self).render(data, *args, **kwargs)
@amatellanes
amatellanes / celery.sh
Last active Oct 3, 2020
Celery handy commands
View celery.sh
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@csswizardry
csswizardry / README.md
Last active Sep 28, 2020
Vim without NERD tree or CtrlP
View README.md

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
You can’t perform that action at this time.