<?php
// OOP Approach with Interfaces and Classes
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
| Sudo su | |
| Install Node Exporter: | |
| docker run -d --net="host" --pid="host" -v "/:/host:ro,rslave" quay.io/prometheus/node-exporter:latest --path.rootfs=/host | |
| Create Prometheus Config: | |
| nano prometheus.yml |
These instructions have moved to https://github.com/emporia-vue-local/esphome
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
| <template name="fn" value="fn ($TYPE$ $INSTANCE$) => $INSTANCE$$END$" description="Arrow function" toReformat="false" toShortenFQNames="true"> | |
| <variable name="TYPE" expression="completeSmart()" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="INSTANCE" expression="concat("$", camelCase(TYPE))" defaultValue="" alwaysStopAt="false" /> | |
| <context> | |
| <option name="PHP Expression" value="true" /> | |
| <option name="PHP Statement" value="true" /> | |
| </context> | |
| </template> |
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
| import 'package:flutter_web/material.dart'; | |
| import 'dart:math' as math; | |
| class DottedBorder extends StatelessWidget { | |
| final Color color; | |
| final double strokeWidth; | |
| final double gap; | |
| final Widget child; | |
| final EdgeInsets padding; |
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/bash | |
| # Creator: Phil Cook | |
| # Modified: Andy Miller | |
| # | |
| # >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh | |
| # >>> Kept here for legacy purposes | |
| # | |
| osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
| osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
| osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) |
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
| #!/usr/bin/env bash | |
| : ' Script that enables TLS for Docker service in Ubuntu 16.x | |
| This script is intended to be run as root | |
| It; | |
| - Generates the keys | |
| - Creates the daemon.json Docker config file |
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ First of all, please note that token expiration and revoking are two different things.
- Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
- Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
NewerOlder