These set of scripts are for Magento 2. For Magento 1, see this Gist.
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
## Usage: | |
## | |
## wget https://gist.githubusercontent.com/arizawan/37e3be7fa4f42516765acb49eb20375d/raw/wordpress_install_mariadb.sh | |
## chmod +x wordpress_install_mariadb.sh | |
## ./wordpress_install_mariadb.sh YOUR_WEBSITE_DOMAIN | |
## | |
## | |
#!/bin/bash |
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
{ | |
"default":"Etc/UTC", | |
"options":{ | |
"Africa/Abidjan":"Africa/Abidjan", | |
"Africa/Accra":"Africa/Accra", | |
"Africa/Algiers":"Africa/Algiers", | |
"Africa/Bissau":"Africa/Bissau", | |
"Africa/Cairo":"Africa/Cairo", | |
"Africa/Casablanca":"Africa/Casablanca", | |
"Africa/Ceuta":"Africa/Ceuta", |
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
### Keybase proof | |
I hereby claim: | |
* I am arizawan on github. | |
* I am arizawan (https://keybase.io/arizawan) on keybase. | |
* I have a public key ASC3LqLAQLyUo7sG032Vec7eQxB9IVqhagAm2qE5pETxGQo | |
To claim this, I am signing this object: |
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
// Code to encrypt data in sequelize fields | |
// We are using ascii85 as a way save on storage. Also, note that | |
// the space delimiter we are using is a bit of an abuse since in | |
// normal cases ascii85 will skip over it, but since we are using | |
// after encoding and before encoding, it shouldn't be an issue. | |
// | |
// Fields are broken down to facilitate unit testing. | |
// | |
// based on code here: http://vancelucas.com/blog/stronger-encryption-and-decryption-in-node-js/ |
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 | |
/** @var \Illuminate\Filesystem\FilesystemAdapter $fs */ | |
$fs = \Storage::disk('object_storage'); | |
/** @var \League\Flysystem\Filesystem $driver */ | |
$driver = $fs->getDriver(); | |
/** @var \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter */ | |
$adapter = $driver->getAdapter(); |
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 | |
// These are just the basics for how to do this. Notes: | |
// - Not fully tested. | |
// - Not suitable for production. | |
// - May not work well if large ammounts of data. | |
// - Requires AWS SDK for PHP and http://php.net/manual/en/book.zip.php | |
require '/path/to/sdk-or-autoloader'; |
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 | |
use Aws\Kms\KmsClient; | |
// Somewhere in the controller or model | |
$this->load->config('aws'); | |
// Not needed for EC2 instance role based authorization - for my local instance only | |
$key = $this->config->item('aws_s3_access_key'); | |
$secret = $this->config->item('aws_s3_secret_key'); |
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
// Part of https://github.com/chris-rock/node-crypto-examples | |
// Nodejs encryption with CTR | |
var crypto = require('crypto'), | |
algorithm = 'aes-256-ctr', | |
password = 'd6F3Efeq'; | |
function encrypt(text){ | |
var cipher = crypto.createCipher(algorithm,password) | |
var crypted = cipher.update(text,'utf8','hex') |
NewerOlder