Skip to content

Instantly share code, notes, and snippets.

View klebercode's full-sized avatar
🎯
Focusing

Kleber Soares klebercode

🎯
Focusing
View GitHub Profile
@klebercode
klebercode / RocketChat-Incoming-Webhook-Taiga-Script.js
Created September 24, 2023 15:40 — forked from Wazabiii/RocketChat-Incoming-Webhook-Taiga-Script.js
RocketChat Incoming Webhook Scripts for Taiga project
/* exported Script */
/* globals console, _, s */
/** Global Helpers
*
* console - A normal console instance
* _ - An underscore instance
* s - An underscore string instance
*/
CREATE OR REPLACE FUNCTION public.clone_schema(
source_schema text,
dest_schema text)
RETURNS void AS
$BODY$
DECLARE
object text;
buffer text;
default_ text;
column_ text;
<html>
<head>
<title>User Initials</title>
<style>
/* Relevant Code */
.person {
display: table;
margin: 24px auto;
}
@klebercode
klebercode / django-graphene-order-by.py
Last active December 8, 2020 00:37
Django Graphene Order By
from graphene_django.filter import DjangoFilterConnectionField
from graphene.utils.str_converters import to_snake_case
class OrderedDjangoFilterConnectionField(DjangoFilterConnectionField):
@classmethod
def resolve_queryset(
cls, connection, iterable, info, args, filtering_args, filterset_class
):
qst = super(DjangoFilterConnectionField, cls).resolve_queryset(
const gray = "#8D8391";
const red = "#A1225D";
const orange = "#EEB56F";
const yellow = "#FCED60";
const purple = "#CE85F8";
const pink1 = "#F62599";
const pink2 = "#C45E9D";
const white = "#CABCD0";
const sidebar_background = "#080112";
const background = "#080112";

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

CREATE OR REPLACE FUNCTION public.clone_schema(
source_schema text,
dest_schema text)
RETURNS void AS
$BODY$
DECLARE
object text;
buffer text;
default_ text;
column_ text;
@klebercode
klebercode / custom-validation-inlineformset.py
Created February 4, 2020 11:43 — forked from nspo/custom-validation-inlineformset.py
Custom validation of Django inline formset
class ProductAutochangeInlineFormSet(
forms.inlineformset_factory(ProductAutochangeSet, ProductAutochange, form=ProductAutochangeForm, extra=1)):
def clean(self):
super(ProductAutochangeInlineFormSet, self).clean()
product_pks = []
num_productautochanges = 0
for form in self.forms:
if not form.is_valid():
continue
@klebercode
klebercode / newrelic-heroku.rst
Created January 9, 2020 17:44 — forked from pydanny/newrelic-heroku.rst
Getting New Relic onto a Heroku Django app

Get the Python library:

pip install newrelic

Add this to your ProcFile:

web: newrelic-admin run-program python cn_project/manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3 --settings=settings.prod