Result:
Version 2022:
# Uppercase the first letter of paragraphs or sentences. | |
pattern = r"^([a-z|á|ả|à|ã|ạ|â|ấ|ẩ|ẫ|ậ|ầ|ă|ắ|ằ|ẳ|ẵ|ặ|đ|é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ|í|ì|ỉ|ĩ|ị|ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ|ú|ù|ủ|ũ|ụ|ư|ú|ừ|ử|ữ|ự|ý|ỳ|ỷ|ỹ|ỵ])" | |
re.sub(pattern, lambda x: x.group(0).upper(), text) |
#!/bin/bash | |
# most of commands should be run with root or sudo | |
# may add -y flag to ignore comfirmation messages | |
# adjust files as your demand | |
# may fix locale issues | |
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>{{if .title}}{{.title}}{{else}}{{block "title" .}}My Website{{end}}{{end}}</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
{{block "media_head" .}}{{end}} | |
</head> | |
<body> | |
<div class="container"> |
#!/bin/bash | |
FP="/home/username/webapps/projectname/projectname/projectname/local_settings.py" | |
if grep -Fxq "DEBUG = False" $FP | |
then | |
sed -i 's/DEBUG = False/DEBUG = True/' $FP | |
echo "DEBUG = True" | |
else | |
sed -i 's/DEBUG = True/DEBUG = False/' $FP | |
echo "DEBUG = False" |
""" | |
#USAGE: | |
## Requirements: | |
requests | |
names | |
click | |
## Executing | |
python xsrf_bkav.py fuckit [number of the requests] | |
""" |
#/bin/bash | |
# Needed Softs | |
apt-get -y install software-properties-common python-software-properties | |
apt-get -y install curl vim unzip htop | |
apt-get -y install nginx | |
apt-get -y install git | |
apt-get -y install rabbitmq-server | |
# Base Libs |
# Original article: https://www.technovelty.org/web/skipping-pages-with-djangocorepaginator.html | |
from django.core.paginator import Paginator | |
from django.test import TestCase | |
class Pages: | |
def __init__(self, objects, count): | |
self.pages = Paginator(objects, count) |
var equalheight = function (container) { | |
var currentTallest = 0, | |
currentRowStart = 0, | |
rowDivs = [], | |
$el, | |
topPosition = 0; | |
$(container).each(function () { | |
$el = $(this); | |
$($el).height('auto'); |
This is intended as a quick reference and showcase. For more complete info, see John Gruber's original spec and the Github-flavored Markdown info page.
This cheatsheet is specifically Markdown Here's version of Github-flavored Markdown. This differs slightly in styling and syntax from what Github uses, so what you see below might vary a little from what you get in a Markdown Here email, but it should be pretty close.
You can play around with Markdown on our live demo page.
(If you're not a Markdown Here user, check out the Markdown Cheatsheet that is not specific to MDH. But, really, you should also use Markdown Here, because it's awesome. http://markdown-here.com)