This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /web/project/ | |
| source /web/project/.env/bin/activate | |
| git pull | |
| pip install -r requirements/staging.txt | |
| python ./manage.py migrate | |
| python ./manage.py collectstatic --noinput | |
| # python ./manage.py test | |
| touch /tmp/project.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"version":1,"resource":"file:///Users/lukas/Workspaces/yusystem/crm/applications/patients/templates/patients/patient_update.html","entries":[{"id":"rLPa.html","source":"searchReplace.source","timestamp":1652430624549},{"id":"phGX.html","timestamp":1653556571680},{"id":"Dv0Y.html","timestamp":1653556617769},{"id":"DF8E.html","timestamp":1653556631940},{"id":"jSj9.html","timestamp":1653556650453},{"id":"3SCp.html","timestamp":1653556729759},{"id":"ZivU.html","timestamp":1653556739833},{"id":"1Pqu.html","timestamp":1653556751612},{"id":"Fype.html","timestamp":1653556783604},{"id":"iFtd.html","timestamp":1653556809117},{"id":"FZKS.html","timestamp":1653556826168},{"id":"qUmJ.html","timestamp":1653556879192}]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import glob | |
| files = glob.glob('applications/**/*.py') | |
| outfilename = 'out.txt' | |
| with open(outfilename, 'w') as outfile: | |
| for filename in files: | |
| if filename == outfilename: | |
| continue | |
| with open(filename, 'r') as readfile: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Get your TOKEN https://yandex.ru/dev/api360/doc/concepts/access.html | |
| # Need access level for app "directory:manage_dns" | |
| YANDEX_TOKEN="<paste your yandex token>" | |
| ORG_ID="<paste your org id>" | |
| # Strip only the top domain to get the zone id | |
| DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)') | |
| SUBDOMAIN=$(expr match "$CERTBOT_DOMAIN" '\(.*\)\..*\..*') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from applications.press.models import Post | |
| from tempfile import NamedTemporaryFile | |
| posts = Post.objects.all() | |
| for post in posts: | |
| if not post.image: | |
| continue | |
| tmp = NamedTemporaryFile(delete=True) | |
| try: | |
| tmp.write(post.image.read()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:async'; | |
| import 'dart:convert'; | |
| import 'dart:io'; | |
| void main() async { | |
| print('Напишите что-нибудь'); | |
| Future<String> inputFuture() async { | |
| String rawInput = stdin.readLineSync(encoding: Encoding.getByName('utf-8')); | |
| return rawInput; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Реализуйте класс Student (Студент), который будет наследоваться от класса User. Класс должен иметь следующие свойства: | |
| class User { | |
| String firstName; | |
| String lastName; | |
| User( | |
| this.firstName, | |
| this.lastName, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:math'; | |
| void main() { | |
| // 1. Создайте текстовую переменную a = ‘hello world’; Напишите функцию, без возвращаемого значения. Функция меняет порядок слов на обратный. Например было ‘hello world’, стало ‘world hello’ | |
| String a = "hello world"; | |
| void reverseWords(String words) { | |
| words = words.split(' ').reversed.toList().join(' '); | |
| print(words); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:convert'; | |
| import 'dart:io'; | |
| void main() { | |
| print('Складываем два простых числа. A + B'); | |
| print('Введите первое число, A:'); | |
| String rawA = stdin.readLineSync(encoding: Encoding.getByName('utf-8')); | |
| print('Введите второе число, B:'); | |
| String rawB = stdin.readLineSync(encoding: Encoding.getByName('utf-8')); |
NewerOlder