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
<?php | |
/** | |
* Simple method to use the API from https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/ | |
* Written by Jim Westergren and released to public domain | |
* @return int count | |
*/ | |
function checkPawnedPasswords(string $password) : int | |
{ | |
$sha1 = strtoupper(sha1($password)); | |
$data = file_get_contents('https://api.pwnedpasswords.com/range/'.substr($sha1, 0, 5)); |
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
1. npm --version | |
2. npm init -y (or) npm init | |
3. npm install node-sass (or) npm install node-sass -D | |
4. run before add some changes on package.json file | |
"scripts": { | |
"sass": "node-sass -w scss/ -o dist/css --recursive" | |
} | |
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
1. npm --version | |
2. npm init -y (or) npm init | |
3. npm install node-sass (or) npm install node-sass -D | |
4. run before add some changes on package.json file | |
"scripts": { | |
"sass": "node-sass -w scss/ -o dist/css --recursive" | |
} | |
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
100% works for me, i have download all files from aws s3 backet. | |
1. install aws cli (and select your operating system , follow the steps) https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html | |
2. check aws version: aws --version | |
3. run config command: aws configure | |
4. aws s3 cp s3://yourbucketname your\local\path --recursive | |
Eg (Windows): aws s3 cp s3://yourbucketname C:\aws-s3-backup\webuybrokenphones --recursive | |
check out this link: https://www.edureka.co/community/32955/how-to-download-an-entire-bucket-from-s3-to-local-folder |
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
public function addOrderProperty() | |
{ | |
$sheets = Sheets::spreadsheet(config('sheets.post_spreadsheet_id'))->sheetList(); | |
$now = now()->year . '/' . now()->month; | |
$id = Arr::get(array_flip($sheets), $now); | |
if (is_null($id)) { | |
$body = new \Google_Service_Sheets_BatchUpdateSpreadsheetRequest(array( | |
'requests' => array( |
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
#! /bin/sh | |
/usr/bin/php /home/username/public_html/project_name/artisan schedule:run 1>> /dev/null 2>&1 |
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
below laravel 8 | |
composer require league/flysystem-aws-s3-v3 "~1.0" | |
For laravel 8 use | |
composer require --with-all-dependencies league/flysystem-aws-s3-v3 "^1.0" |
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
1. install the choco | |
https://docs.chocolatey.org/en-us/choco/setup | |
2.choco install webp | |
more info, checkout here | |
https://www.smashingmagazine.com/2018/07/converting-images-to-webp/ | |
3. a file conversion | |
cwebp -q 75 test.jpg -o output.webp |
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
Bulk rename the files | |
$i=1 | |
Get-ChildItem *.webp | %{Rename-Item $_ -NewName ('{0}.webp' -f $i++)} |
OlderNewer