This file contains 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: '3' | |
services: | |
agent: | |
image: portainer/agent:2.17.1 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- /var/lib/docker/volumes:/var/lib/docker/volumes | |
networks: |
This file contains 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. For react we made this gist. It is worth noting that the project uses the old version of the react | |
and in this example the componentWillReceiveProps (newProps) method is specified, | |
which will stop working in the 17th version of the react. | |
We refactored ViewedSlider.js for an example of switching to version 17. | |
2. I am attaching a small video of the test.customorrow.com project, which is made on Vue.js. | |
It demonstrates our experience in js, even if not in the organization of the project, | |
but the approach itself is important. While coding on vue.js we understand some things at react. | |
You can pause and watch the code. https://yadi.sk/i/u1oJrgZNZ_bOeA |
This file contains 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
var data = []; | |
$('.b-link.b-phrase-link__link').each(function(){ | |
data.push($(this).text()); | |
}) | |
$('.b-form-input__input').prop('value', data); |
This file contains 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 requests | |
r = requests.get('https://api.instagram.com/v1/users/search?q=mkispb&count=1&access_token=...') | |
user_id = None | |
for user in r.json()['data']: | |
if user['username'] == 'mkispb': | |
user_id = user['id'] |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Скрипт для скачивания музыки с сайта vkontakte.ru (vk.com) | |
Запуск: | |
python vkcom_audio_download.py | |
Принцип работы: | |
Скрипт проверяет сохраненный access_token. Если его нет или срок истек, | |
то открывается страница в браузере с запросом на доступ к аккаунту. |
This file contains 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
[color] | |
ui = true | |
[user] | |
email = [email protected] | |
name = xxxx.xxxx | |
[giggle] | |
main-window-maximized = true | |
main-window-geometry = 430x176+343+25 | |
history-view-vpane-position = 285 | |
main-window-view = HistoryView |
This file contains 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 django.db.models.signals import post_init | |
def track_data(*fields): | |
""" | |
Tracks property changes on a model instance. | |
The changed list of properties is refreshed on model initialization | |
and save. | |
>>> @track_data('name') |
This file contains 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
/** | |
* SELECT2 | |
* | |
* Renders Select2 - jQuery based replacement for select boxes | |
* | |
* Requires an 'options.values' value on the schema. | |
* Can be an array of options, a function that calls back with the array of options, a string of HTML | |
* or a Backbone collection. If a collection, the models must implement a toString() method | |
*/ | |
Backbone.Form.editors.Select2 = Backbone.Form.editors.Base.extend({ |
This file contains 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 django.contrib.auth.models import User | |
user = User.objects.get(pk=5) | |
user.set_password('super-sekrit') | |
user.save() |
This file contains 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
//Функция вызывается при клике по кнопке | |
public function onClick(event:Event) : void | |
{ | |
// Пробегаем по массиву композиций и формируем массив для | |
// загрузки "urlLoader" | |
while (i < this.arrMusic.length) | |
{ | |
// Формируем Request | |
var urlRequest:URLRequest = new URLRequest(); | |
urlRequest.url = ''; // ссылка куда грузим файл |
NewerOlder