As configured in my dotfiles.
start new:
tmux
start new with session name:
remember_me = forms.BooleanField(required=False, widget=forms.CheckboxInput()) | |
if not self.cleaned_data.get('remember_me'): | |
self.request.session.set_expiry(0) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Stackoverflow help please</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
$('html, body').animate({ |
{% load static %} | |
<!DOCTYPE html> | |
<html lang="pt"> | |
<head> | |
<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> |
.container-fluid { | |
margin: 3rem auto; | |
max-width: 62%; | |
} | |
/* Header */ | |
header { | |
border-bottom: 1px solid gray; | |
margin-bottom: 3rem; |
# https://hakibenita.com/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): |
#!/bin/bash | |
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" ] |
#!/bin/bash | |
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" ] | |
then | |
read -p "Type your Github username: " GITHUB_USERNAME | |
echo "user.login: $GITHUB_USERNAME" >> ~/.githubrc | |
fi |