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 App\Http\Controllers\Payroll\PayrollBankFile; | |
use App\Models\Bank; | |
use App\Models\CompanyPayrollDetail; | |
use App\Models\Staff; | |
use Illuminate\Support\Facades\Crypt; | |
trait PayrollCSVTrait |
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
[db] | |
host = "localhost" | |
name = "database-name" | |
user = "user-name" | |
pass = null | |
port = 3306 | |
[azure] | |
key = '<container-shared-key>' | |
account = '<azure-account-name>' |
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 | |
### Full Extraction | |
# This will dump all tables to .csv and upload to azure blob storage in a datetime folder | |
# Database Credentials | |
db_name='<database name>' | |
db_user='<db username>' | |
db_pass='<db password>' | |
db_host='localhost' |
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 | |
# composer require firebase/php-jwt | |
use Firebase\JWT\JWT; | |
use Illuminate\Support\Facades\Http; | |
class GoogleOauthHelper | |
{ |
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 App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
class FindRiskyFieldsOnDatabases extends Command | |
{ | |
/** |
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 | |
# composer require web-token/jwt-framework | |
require_once 'vendor/autoload.php'; | |
use Jose\Component\Core\AlgorithmManager; | |
use Jose\Component\KeyManagement\JWKFactory; | |
use Jose\Component\Signature\Algorithm\ES256; | |
use Jose\Component\Signature\JWSBuilder; | |
use Jose\Component\Signature\Serializer\CompactSerializer; |
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
/** | |
| Created since I have multiple image files in one folder example: | |
| "Holiday at Hawaii 2022 - image 1.jpg" | |
| "Holiday at Hawaii 2022 - image 2.jpg" | |
| "Holiday at Hawaii 2022 - image 3.jpg" | |
| "Alex Birthday 2019 - IMG2021290219.jpg" | |
| "Alex Birthday 2019 - IMG2021901920.jpg" | |
| | |
| I want to move them to their own individual folder "Holiday at Hawaii 2022" & "Alex Birthday 2019" | |
| -------------------------------------------------- |
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 php:7.4-fpm | |
RUN apt-get update && apt-get install -qy --no-install-recommends \ | |
curl \ | |
openssl \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libmagickwand-dev \ | |
libmcrypt-dev \ | |
libgmp-dev\ |
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
### GitHub ### | |
- Create new release for master branch after merging | |
- run production instance | |
- ssh to prod server | |
$ ssh -i "your_pem.pem" ubuntu@<your public dns>.compute.amazonaws.com | |
### Ubuntu Console ### |
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
/* | |
* Download .pem, connect SSH tunnel after set up Ubuntu instance. | |
* Open terminal and use following command | |
* This setup should more or less the same for any provider like DigitalOcean too. | |
$ ssh -i "your_pem.pem" ubuntu@<your public dns>.compute.amazonaws.com | |
/* | |
* the following command may need root privilage | |
* better create new user with root privilage to do commands |
NewerOlder