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
UPDATE | |
media | |
SET | |
"index" = s.ordering::INT | |
, "updated_at" = CURRENT_TIMESTAMP | |
FROM ( | |
SELECT | |
"unnest" | |
, "ordinality" | |
FROM |
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
# /etc/systemd/system/drone.service | |
[Unit] | |
Description=Drone server | |
After=docker.service nginx.service | |
[Service] | |
Restart=always | |
ExecStart=/usr/local/bin/docker-compose -f /etc/drone/docker-compose.yml up | |
ExecStop=/usr/local/bin/docker-compose -f /etc/drone/docker-compose.yml stop |
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
SOURCE_SQLITE_PATH=$(pwd)/db.sqlite SOURCE_TABLE_NAME=? PSQL_TARGET_HOST=? PSQL_TARGET_DB=? PSQL_TARGET_USER=? PSQL_TARGET_PASS=? docker run --rm -v ${SOURCE_SQLITE_PATH}:/root/db/db.sqlite -v $(pwd)/output.sql:/root/db/output.sql --name sqlite3-export nouchka/sqlite3:latest db\.sqlite .mode\ insert select\ *\ from\ ${SOURCE_TABLE_NAME} > output.sql && docker run --rm -v $(pwd)/output.sql:/dev/shm/inserts.sql -env PGPASSWORD=${PSQL_TARGET_PASS} --name pgsql-import postgres:12.1-alpine psql -h ${PSQL_TARGET_HOST} -U ${PSQL_TARGET_USER} ${PSQL_TARGET_DB} < /dev/shm/inserts.sql && rm output.sql |
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
git checkout -b mybranch | |
git push origin mybranch | |
git checkout master | |
git reset --hard origin/master |
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 genrsa -aes128 -passout stdin -out test.key 4096 | |
openssl rsa -in test.key -pubout -out test.key.pub |
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
# Pipeline allows to manage gcp cloud functions deployment and undeployments via git repository | |
# Required gcp permissions: | |
# * cloudfunctions.functions.create | |
# * cloudfunctions.functions.delete | |
# * cloudfunctions.functions.get | |
# * cloudfunctions.functions.sourceCodeSet | |
# * cloudfunctions.functions.update | |
# * cloudfunctions.operations.get | |
image: "xxx" |