NOTICE: This will take up about 3 GB of space on your device, before syncing any repos or projects.
Install Termux from the Play Store and launch it
Once it finishes unpacking:
pkg update
pkg upgrade -y
| #!/bin/bash | |
| CLEAR='\033[0m' | |
| RED='\033[0;31m' | |
| function usage() { | |
| if [ -n "$1" ]; then | |
| echo -e "${RED}👉 $1${CLEAR}\n"; | |
| fi | |
| echo "Usage: $0 [-n number-of-people] [-s section-id] [-c cache-file]" | 
| -- Function to automatically create a user_id column for new tables with name starting with user_ | |
| create or replace function create_user_id_column() | |
| returns event_trigger | |
| language plpgsql volatile as | |
| $$ | |
| declare | |
| obj record; | |
| identity text[]; | |
| begin | |
| for obj in select * from pg_event_trigger_ddl_commands() | 
| # Public domain | |
| from urllib import request | |
| def post_data(url, data, headers={'Content-Type':'application/json'}): | |
| """ | |
| POST data string to `url`, return page and headers | |
| """ | |
| # if data is not in bytes, convert to it to utf-8 bytes | |
| bindata = data if type(data) == bytes else data.encode('utf-8') | 
NOTICE: This will take up about 3 GB of space on your device, before syncing any repos or projects.
Install Termux from the Play Store and launch it
Once it finishes unpacking:
pkg update
pkg upgrade -y
Because we already have an official CockroachDB docker image, we will use that in our docker-compose.yml file. We recommend you use one of the current tags instead of latest.
| # reference: https://github.com/sqlalchemy/sqlalchemy/issues/5626 | |
| import pytest | |
| import sqlalchemy as sa | |
| from sqlalchemy import orm | |
| from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession | |
| Base = orm.declarative_base() | 
telegram.message{{ define "alert_list" }}{{ range . }}{{ .Labels.alertname }}
{{ range .Annotations.SortedPairs }}<strong>{{ .Name }}</strong>: {{ .Value }}
{{ end }}| {{ if gt (len .GeneratorURL) 0 }}<a href="{{ .GeneratorURL }}">source</a> | {{ end }}{{ if gt (len .SilenceURL) 0 }}<a href="{{ .SilenceURL }}">silence</a> | {{ end }}{{ if gt (len .DashboardURL) 0 }}<a href="{{ .DashboardURL }}">dashboard</a> | {{ end }}{{ if gt (len .PanelURL) 0 }}<a href="{{ .PanelURL }}">panel</a> |{{ end }}
—
{{ end }}{{ end }}
{{ define "telegram.message" }}
{{ if gt (len .Alerts.Firing) 0 }}FIRING!!!
| #!/data/data/com.termux/files/usr/bin/bash | |
| # https://github.com/orgzly/orgzly-android/issues/8 | |
| orgzly_sync() { | |
| # if you are using orgzly-revived use the following instead: | |
| # am broadcast -n com.orgzlyrevived/com.orgzly.android.ActionReceiver -a com.orgzly.intent.action.SYNC_START | |
| am broadcast -n com.orgzly/com.orgzly.android.ActionReceiver -a com.orgzly.intent.action.SYNC_START | |
| } | 
telegram.message{{- /* Telegram message to use: {{ template "telegram.message2" . }} */ -}}
{{ define "__alerts_list" -}}
{{ range . }}
{{if ne (index .Labels "alertname") "" -}}
{{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }}
    {{- if ne (index .Labels "severity") "" -}}
        <u><b>P{{ index .Labels "severity" }}</b></u> {{ end -}}