Skip to content

Instantly share code, notes, and snippets.

View erlangparasu's full-sized avatar

Erlang Parasu erlangparasu

View GitHub Profile
adb shell ps | grep "u0_"
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart",
grep -iRl "your-text-to-find" ./
// ...
/**
* Servers configuration
*/
$i = 0;
// I
$i++;
/* Authentication type */
find / -iname '*bat*'
find / -name '*bat*'
php72-php-bcmath \
php72-php-brotli \
php72-php-channel-horde \
php72-php-cli \
php72-php-common \
php72-php-componere \
php72-php-dba \
php72-php-dbg \
php72-php-devel \
php72-php-embedded \
@erlangparasu
erlangparasu / settings.json
Created February 28, 2020 07:46
Fix Visual Studio Code is unable to watch for file changes in this large workspace (error ENOSPC)
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/public/assets/**": true,
"**/storage/debugbar/**": true,
"**/storage/framework/**": true,
"**/vendor/**": true
}
$('#start_date_').val(
moment(ev.date).format('YYYY-MM-DD HH:mm:ss')
);
@erlangparasu
erlangparasu / strip-all-non-ASCII.php
Created February 12, 2020 20:47
To strip all non-ASCII characters from the input string
<?php
// To strip all non-ASCII characters from the input string
$result = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $string);
// That code removes any characters in the hex ranges 0-31 and 128-255, leaving only the hex characters 32-127 in the resulting string, which I call $result in this example.
// Thanks to https://stackoverflow.com/users/6589057/junaid-masood
// Link: https://stackoverflow.com/questions/1176904/php-how-to-remove-all-non-printable-characters-in-a-string/54072059#54072059

.env

REDIRECT_HTTPS=true

config/app.php

'redirect_https' => env('REDIRECT_HTTPS', false),