docs/conf.py
import importlib
import inspect
import os
import sys| from django.db.models import Count, Max | |
| unique_fields = ['field_1', 'field_2'] | |
| duplicates = ( | |
| MyModel.objects.values(*unique_fields) | |
| .order_by() | |
| .annotate(max_id=Max('id'), count_id=Count('id')) | |
| .filter(count_id__gt=1) | |
| ) |
In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.
We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.
I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.
deprecated
for_window [class="^.*"] border pixel 1
new_window 1pixel
thanks to deviatorslegacy's comment
Document here:
https://i3wm.org/docs/userguide.html#_default_border_style_for_new_windows
| /* | |
| Include this after bootstrap.css. Add class of | |
| vert-offset-top-value or vert-offset-bottom-value | |
| to your Bootstrap 3 default rows to prevent row content | |
| from touching the row content above or below. | |
| */ | |
| /* Vertical Offset Bottom */ | |
| .vert-offset-top-12{ | |
| margin-top: 12em; |
| #!/usr/bin/env bash | |
| # usage: | |
| # local branches only: `myUnmerged` | |
| # remote branches only: `myUnmerged -r` | |
| # all branches: `myUnmerged -a` | |
| # | |
| # example output: | |
| # | |
| # BRANCH TOTAL COMMITS KOGI KOGI UNMERGED |
| !function ($) { | |
| $(function(){ | |
| $('#home, #me, #footer').carousel({}); | |
| var $root = $('html, body'); | |
| $('a').click(function() { | |
| var href = $.attr(this, 'href'); | |
| $root.animate({ | |
| scrollTop: $(href).offset().top |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |