We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
#-*- coding: utf-8 -*- | |
import urlparse | |
from django.contrib.auth import REDIRECT_FIELD_NAME, login | |
from django.contrib.auth.forms import AuthenticationForm | |
from django.http import HttpResponseRedirect | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import never_cache | |
from django.views.decorators.csrf import csrf_protect | |
from django.views.generic.edit import FormView | |
from django.conf import settings |
1) Create a branch with the tag | |
git branch {tagname}-branch {tagname} | |
git checkout {tagname}-branch | |
2) Include the fix manually if it's just a change .... | |
git add . | |
git ci -m "Fix included" | |
or cherry-pick the commit, whatever is easier | |
git cherry-pick {num_commit} | |
import sqlite3 | |
# open connection and get a cursor | |
conn = sqlite3.connect(':memory:') | |
c = conn.cursor() | |
# create schema for a new table | |
c.execute('CREATE TABLE IF NOT EXISTS sometable (name, age INTEGER)') | |
conn.commit() |
#!/bin/sh | |
sc () { | |
if [ $COLOR = "bar" ] ; then | |
case $2 in | |
bold) case $1 in | |
black) echo "%{F#FF000000}";; | |
red) echo "%{F#FFFF0000}";; | |
green) echo "%{F#FF00FF00}";; | |
yellow) echo "%{F#FFFF4500}";; |
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
{% extends "base.html" %} | |
{% block content %} | |
<form method="post">{% csrf_token %} | |
{{ forms.subscription }} | |
<input type="submit" value="Subscribe"> | |
</form> | |
<form method="post">{% csrf_token %} | |
{{ forms.contact }} | |
<input type="submit" value="Send"> |
<?php | |
/** | |
* Escape markdown text | |
* | |
* @param string $text the markdown text to escape | |
* | |
* @return string escaped text | |
*/ | |
function markdown_escape($text) { | |
return str_replace([ |
# fzf improvement to preview content from files | |
function fzf-lovely(){ | |
fzf -m --preview '[[ $(file --mime {}) =~ binary ]] && | |
echo {} is a binary file || | |
(bat --style=numbers --color=always {} || | |
highlight -O ansi -l {} || | |
coderay {} || | |
rougify {} || | |
cat {}) 2> /dev/null | head -500' | |
} |