Skip to content

Instantly share code, notes, and snippets.


Kleber Soares klebercode

Block or report user

Report or block klebercode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
klebercode /
Created Sep 23, 2019 — forked from tricoder42/
GraphQL Subscriptions with django-channels

GraphQL Subscription with django-channels

Django channels are official way for implementing async messaging in Django.

The primary caveat when working with GraphQL subscription is that we can't serialize message before broadcasting it to Group of subscribers. Each subscriber might use different GraphQL query so we don't know how to serialize instance in advance.

See related issue

remember_me = forms.BooleanField(required=False, widget=forms.CheckboxInput())
if not self.cleaned_data.get('remember_me'):
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

View jquery-scroll-animate.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Stackoverflow help please</title>
<script src=""></script>
$(document).ready(function() {
$('html, body').animate({
View base.html
{% load static %}
<!DOCTYPE html>
<html lang="pt">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Agenda de Contatos</title>
View style.css
.container-fluid {
margin: 3rem auto;
max-width: 62%;
/* Header */
header {
border-bottom: 1px solid gray;
margin-bottom: 3rem;
klebercode /
Created Apr 25, 2019 — forked from hakib/
How to Turn Django Admin Into a Lightweight Dashboard
from django.contrib import admin
from django.db.models import Count, Sum, Min, Max, DateTimeField)
from django.db.models.functions import Trunc
from . import models
def get_next_in_date_hierarchy(request, date_hierarchy):

Este PR é relacionado a qual issue?

Conectado a #

Este PR precisa de atenção especial em algum detalhe?

Caso positivo descreva aqui


Comportamento Esperado

Comportamento Atual

command_exists () {
type "$1" &> /dev/null ;
export GITHUB_REPO="user/repo"
export GITHUB_USERNAME=$(cat ~/.githubrc 2> /dev/null | grep user.login | cut -d ":" -f2 | xargs)
export GITHUB_PASSWORD=$(cat ~/.githubrc 2> /dev/null | grep user.password | cut -d ":" -f2 | xargs)
if [ -z "$GITHUB_USERNAME" ]
You can’t perform that action at this time.