Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
{ | |
"require": { | |
"symfony/error-handler": "^5.3" | |
} | |
} |
<?php | |
/* | |
* This file is part of the Symfony package. | |
* | |
* (c) Fabien Potencier <fabien@symfony.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
var data | |
var formId = 'form' | |
function drawForm() { | |
if (!data) return | |
var outputEl = document.getElementById(formId); |
var path = require('path'); | |
var webpack = require('webpack'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var glob = require('glob'); | |
var postcssModules = require('./configs/postcssModules.js'); | |
var entries = getEntries('./source/pages/', 'js'); // Obtain entry js file |
This is proof-of-concept implementation of laravel's like form requests.
Most of Symfony developers uses forms to map request data to some Data Transfer Object. This object then passes to validator and system start to work with validated data converted to be compatible with application model.
# disable auto rotation | |
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0 | |
# force landscape | |
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1 | |
# back to portrait | |
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0 | |
# upside down |
<?php | |
class BackupDroplet | |
{ | |
private $apiUrl = 'https://api.digitalocean.com/v2/'; | |
private $token; | |
private $dropletId; | |
public function __construct($token, $dropletId) | |
{ |
# t2.small | |
pm = dynamic | |
pm.max_children = 35 | |
pm.start_servers = 6 | |
pm.min_spare_servers = 4 | |
pm.max_spare_servers = 8 | |
pm.max_requests = 300 | |
# t2.medium |