Data is organized to meet a schema. Think tables which organize data into rows and columns.
Data is unorganized and lacks a schema. Imagine collections of html documents including text and images not organized in any consistent way.
| #!/bin/sh | |
| # Make sure to: | |
| # 1) Name this file `backup.sh` and place it in /home/ubuntu | |
| # 2) Run sudo apt-get install awscli to install the AWSCLI | |
| # 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
| # 4) Fill in DB host + name | |
| # 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
| # 6) Run sudo mkdir /data/tmp | |
| # 7) Run sudo chmod 777 /data/tmp/ |
| version: '2' | |
| services: | |
| dremio: | |
| image: dremio/dremio-oss | |
| container_name: dremio | |
| #volumes: | |
| #- dremio-local:/opt/dremio/data | |
| ports: | |
| - 9047:9047 | |
| - 31010:31010 |
Data is organized to meet a schema. Think tables which organize data into rows and columns.
Data is unorganized and lacks a schema. Imagine collections of html documents including text and images not organized in any consistent way.
| #!/bin/sh | |
| # Adds an IP to Cloudflare IP block list | |
| # Path: /var/ossec/active-response/bin/cloudflare-ban.sh | |
| # Authors: Bryan Dwyer (bdtech) and Almir Bolduan (almirb) | |
| # Last modified: May 08, 2019 | |
| # | |
| # Sample config (Edit /var/ossec/etc/ossec.conf): | |
| # | |
| # <command> | |
| # <name>cloudflare-ban</name> |
| <?php | |
| class PostController extends Controller | |
| { | |
| // ... | |
| public function actionDelete($id) | |
| { | |
| $this->findModel($id)->delete(); | |
| if (!Yii::$app->request->isAjax) { | |
| return $this->redirect(['index']); |
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality. With this file you'll able to compress a bunch of PDF files at once.
Usage
First, download and install Ghostpdf (https://ghostscript.com/download/). From command prompt, run compress-pdf.md "source folder" "destination folder" e.g:
| #!/bin/bash -e | |
| # Original credits to theodorosploumis | |
| # IMPORTANT. My phpstom installation exists on /opt/phpstorm. | |
| if [ "$(whoami)" != "root" ] | |
| then | |
| echo "Sorry, you are not root." | |
| exit 1 | |
| fi | |
| <?php | |
| /* | |
| * [Yii2][Migration] Todos os estados e cidades do Brasil | |
| * | |
| * Autor: Emanuel A. Leite (https://github.com/AnDroidEL) | |
| * Data: 02/04/2016 | |
| * | |
| * Ajustes: Almir Bolduan (https://github.com/almirb) | |
| * Data: 01/09/2016 |