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
# !/bin/bash | |
# Remove all files in these directories. | |
rm -rf ~/.helm/cache/archive/* | |
rm -rf ~/.helm/repository/cache/* | |
# Refreash repository configurations | |
helm repo update | |
#That's all. | |
#If you "helm search" next time, you can find newest stable charts in repository. |
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 sys | |
import requests | |
API_KEY = "YOUR_API_KEY" | |
ENDPOINT = "https://api.openai.com/v1/engines/davinci-codex/completions" | |
HEADERS = { | |
"Content-Type": "application/json", | |
"Authorization": f"Bearer {API_KEY}" | |
} | |
SESSION_ID = "your_session_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
#!/bin/bash | |
export DEBIAN_FRONTEND="noninteractive" | |
export KUBERNETES_VERSION="1.24.10-00" | |
export DPKG_LOCK_TIMOUT="-1" | |
############################################# | |
# Update && upgrade && install docker.io # | |
############################################# | |
sudo apt-get update && sudo apt-get upgrade -y |
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
#!/usr/bin/env bash | |
# | |
# Get the value of a tag for a running EC2 instance. | |
# | |
# This can be useful within bootstrapping scripts ("user-data"). | |
# | |
# Note the EC3 instance needs to have an IAM role that lets it read tags. The policy | |
# JSON for this looks like: | |
# | |
# { |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
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
SELECT | |
* | |
FROM profiles_courier | |
LEFT JOIN (SELECT ---- ДЖойним заказы с выручкой/предоплатой за последние 7 дней исключая now() - 1 day | |
courier_id, | |
count(orders.id) cashorders, -- Всего заказов | |
sum(declared_value) cashsum, -- Общая сумма | |
max(declared_value) maxcash -- Максимальная сумма в 1 заказе |
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
class RealtyObjectAdmin(admin.ModelAdmin): | |
list_display = ['realty_complex', | |
'square', 'rent_available', | |
'floor', 'flat_number', 'rent_price_eur'] | |
search_fields = ['realty_complex', ] | |
autocomplete_fields = ('realty_complex', ) | |
fieldsets = ( | |
(None, { | |
'fields': (('realty_complex', 'created_at', 'photo', ), |
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
{% if is_paginated %} | |
<ul class="pagination"> | |
{% if page.has_previous %} | |
<li> | |
<span><a href="?page={{ page.previous_page_number }}">Previous</a></span> | |
</li> | |
{% endif %} | |
<li class=""> | |
<span>Page {{ page.number }} of {{ page.paginator.num_pages }}.</span> | |
</li> |
NewerOlder