Result:
Version 2022:
| var equalheight = function (container) { | |
| var currentTallest = 0, | |
| currentRowStart = 0, | |
| rowDivs = [], | |
| $el, | |
| topPosition = 0; | |
| $(container).each(function () { | |
| $el = $(this); | |
| $($el).height('auto'); |
| # 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) |
| #/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 |
| """ | |
| #USAGE: | |
| ## Requirements: | |
| requests | |
| names | |
| click | |
| ## Executing | |
| python xsrf_bkav.py fuckit [number of the requests] | |
| """ |
| #!/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" |
| <!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 | |
| # 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 |
| # Uppercase the first letter of paragraphs or sentences. | |
| pattern = r"^([a-z|á|ả|à|ã|ạ|â|ấ|ẩ|ẫ|ậ|ầ|ă|ắ|ằ|ẳ|ẵ|ặ|đ|é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ|í|ì|ỉ|ĩ|ị|ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ|ú|ù|ủ|ũ|ụ|ư|ú|ừ|ử|ữ|ự|ý|ỳ|ỷ|ỹ|ỵ])" | |
| re.sub(pattern, lambda x: x.group(0).upper(), text) |
| #!/bin/bash | |
| cd /home/username/webapps/my_ghost_blog | |
| curl -LOk https://ghost.org/zip/ghost-latest.zip | |
| unzip ghost-latest.zip -d ghost-latest | |
| cd ./ghost | |
| rm -rf core index.js package.json npm-debug.log *.md | |
| cp -R ../ghost-latest/core . | |
| cp -R ../ghost-latest/index.js . |