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 | |
while true | |
do | |
export DISPLAY=:0.0 | |
battery_level=`cat /sys/class/power_supply/BAT0/capacity` | |
battery_status=`cat /sys/class/power_supply/BAT0/status` | |
if [ $battery_status = "Charging" ] && [ $battery_level -ge 80 ]; | |
then | |
notify-send -u critical "Battery at 80%." | |
fi |
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
sudo su | |
# Set local timezone | |
timedatectl set-timezone Asia/Manila | |
yum update -y | |
# Search for nginx package | |
amazon-linux-extras | grep nginx |
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
sudo su | |
# WEBSOCKET START | |
# Install PHP 7.4. you can use 'php74' command | |
yum groupinstall -y "Development Tools" | |
yum install -y php74 | |
yum install -y php74-php-xml php74-php-mbstring php74-php-pear php74-php-devel | |
# Install ev extension to open connection limit (this will override the default system 1024 concurrent limit connection) | |
/opt/remi/php74/root/usr/bin/pecl install ev |
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 Drupal\yourmodule\Plugin\views\filter; | |
use Drupal\Core\Entity\Element\EntityAutocomplete; | |
use Drupal\Core\Entity\EntityStorageInterface; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\node\Entity\Node; | |
use Drupal\node\NodeStorageInterface; | |
use Drupal\views\ViewExecutable; |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews -Indexes | |
</IfModule> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^dashboard.liveablecities.ph$ [NC] | |
RewriteRule ^(.*)$ http://%{HTTP_HOST} [L,R] |
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
{ | |
"settings": { | |
"search.exclude": { | |
"vendor": true, | |
"node_modules": true | |
}, | |
"files.watcherExclude": { | |
"vendor": true, | |
"node_modules": true | |
} |
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
{ | |
"search.exclude": { | |
"**/.git/objects/**": true, | |
"**/.git/subtree-cache/**": true, | |
"**/node_modules/**": true | |
}, | |
"files.exclude": { | |
"**/.git/objects/**": true, | |
"**/.git/subtree-cache/**": true, | |
"**/node_modules/**": true |
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
$(document).on('click', function (e) { | |
var $clicked = $(e.target); | |
if ($clicked == $('header') || $clicked.parents('header').length) { | |
return; | |
} | |
// Your code here | |
}); |
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
barryvdh/laravel-debugbar | |
proengsoft/laravel-jsvalidation | |
laravelcollective/html | |
intervention/image |
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; | |
use Library1; | |
use Library2; | |
use Library3; | |
use Library4; | |
class ClassName extends ParentController |