- Enable RDS logger
- Run some huge operations
- Download each audit log one by one in single folder.
- Run next command to join all logs to single file:
cat * | awk -F "'" 'BEGIN{OFS="'\''"} NF-=1 {$1=""; print $0}' | cut -c2- > all.sql
- Download and run
analyze.sh
.
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
name: automated-tests | |
# only manual run | |
on: | |
workflow_dispatch: | |
jobs: | |
automated-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v2 |
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 skilldlabs/php:82 as spx | |
RUN apk update && apk add php82-dev libzip-dev libxml2-dev openssl git unzip acl zlib-dev autoconf g++ make \ | |
&& cd /opt \ | |
&& wget https://github.com/NoiseByNorthwest/php-spx/archive/refs/heads/master.zip -O php-spx.zip \ | |
&& unzip php-spx.zip \ | |
&& rm php-spx.zip \ | |
&& cd php-spx-master \ | |
&& phpize82 \ | |
&& ./configure --with-php-config=/usr/bin/php-config82 \ | |
&& make \ |
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 | |
# Payload example: | |
# '{"httpMethod": "GET", "path": "/foo/bar"}' | |
FUNCTION_NAME=$1 | |
PAYLOAD=$2 | |
aws lambda invoke --function-name ${FUNCTION_NAME} --invocation-type RequestResponse --cli-binary-format raw-in-base64-out --payload "${PAYLOAD}" /tmp/response.json && cat /tmp/response.json | jq -r '.body' | jq |
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
<?php | |
namespace Drupal\better_rest_api\Plugin\views\display; | |
use Drupal\Core\Render\RenderContext; | |
use Drupal\Component\Utility\Html; | |
use Drupal\rest\Plugin\views\display; | |
use Drupal\views\Render\ViewsRenderPipelineMarkup; | |
/** |
Put video file with name video.mp4
# create virtual env
python -m venv .venv
source .venv/bin/activate
# install dependencies for extracting audio file from video
pip install -r requirements.txt
python extract_audio.py
# install OpenAi Whisper to extract text and translate on the fly
pip install openai-whisper
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
- Phing configuration file | |
- | |
- Installation: | |
- `curl -OLsS https://www.phing.info/get/phing-latest.phar` | |
- `chmod +x phing-latest.phar` | |
- `mv phing-latest.phar /usr/local/bin/phing-latest` | |
- | |
- Configuration: |
composer require --dev phpstan/phpstan
- Add composer patch https://github.com/phpstan/phpstan/pull/1080.patch
- Put this files to your project in
phpstan
directory - Run it:
./bin/phpstan analyse -c ./phpstan/phpstan.neon -l max docroot/modules/custom/
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 | |
# Download random wallpaper from desktoppr.co | |
# Save this file: | |
# $ curl -s https://gist.githubusercontent.com/zviryatko/055f8f4850bf17323c4f127a4daeccdf/raw/random-wallpaper.sh > $HOME/.local/bin/random-wallpaper | |
# $ chmod a+x $HOME/.local/bin/random-wallpaper | |
# $ crontab -e | |
# and add this line to the end: | |
# */20 * * * * $HOME/.local/bin/random-wallpaper | |
IMG_PATH="$HOME/.cache/wallpaper.jpg" | |
curl -s `curl -s https://api.desktoppr.co/1/wallpapers/random | python -c "import json,sys; obj=json.load(sys.stdin); print obj['response']['image']['url'];"` > $IMG_PATH |
NewerOlder