A comprehensive guide to secure your Laravel application against common attacks and vulnerabilities.
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
npm install -g uglify-js clean-css-cli |
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 | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
exit 1 | |
} | |
# Check if at least one argument (input file) is provided | |
if [ $# -lt 1 ]; then |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.9.0; | |
library console { | |
address constant CONSOLE_ADDRESS = | |
0x000000000000000000636F6e736F6c652e6c6f67; | |
function _sendLogPayloadImplementation(bytes memory payload) internal view { | |
address consoleAddress = CONSOLE_ADDRESS; | |
/// @solidity memory-safe-assembly |
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
image: atlassian/default-image:3 | |
pipelines: | |
branches: | |
develop: | |
- step: | |
name: Deploy to GCP | |
caches: | |
- docker | |
script: |
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 node:lts-alpine3.18 | |
WORKDIR /app | |
COPY package.json . | |
RUN yarn | |
COPY . . | |
RUN yarn build | |
EXPOSE 3000 | |
CMD [ "yarn", "start:prod" ] |
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\Providers; | |
use Illuminate\Support\Facades\Blade; | |
use Illuminate\Support\ServiceProvider; | |
class JsTranslationsServiceProvider extends ServiceProvider | |
{ | |
public function register(): void |
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
# Node Js | |
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash - | |
sudo yum install nodejs | |
node --version | |
npm --version | |
# Redis |
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
export function decode(querystring: string): object { | |
function parseValue(value: string): any { | |
if (value === 'TRUE') return true; | |
if (value === 'FALSE') return false; | |
return isNaN(Number(value)) ? value : Number(value); | |
} | |
function dec(list: any[], isArray = false): object { | |
let obj: any = isArray ? [] : {}; |
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
import { defineConfig } from 'vite'; | |
import laravel from 'laravel-vite-plugin'; | |
export default defineConfig({ | |
server: { | |
https: { | |
key: "/opt/homebrew/etc/httpd/certs/syanat-app.test-key.pem", | |
cert: "/opt/homebrew/etc/httpd/certs/syanat-app.test.pem", | |
}, | |
host: 'syanat-app.test', |
NewerOlder