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
<?php | |
class ApplyAccordingToParametersHelper | |
{ | |
private const DIVISOR_OR = '||'; | |
private const DIVISOR_AND = '&&'; | |
private const DIVISOR_TYPE = ':'; | |
private const DENIAL = '!'; | |
/** |
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
{ | |
"$help": "https://aka.ms/terminal-documentation", | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": | |
[ | |
{ | |
"command": | |
{ | |
"action": "copy", | |
"singleLine": false |
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
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
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
const debounceEvent = (fn, wait = 500, time) => (...args) => clearTimeout(time, time = setTimeout(() => fn(...args), wait)) | |
/* | |
Example: | |
document.querySelector('input').addEventListener('keyup', debounceEvent((event) => console.log(event))) | |
*/ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<script> | |
var stockData = [ | |
{ |
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
FROM php:7.2.2-fpm | |
RUN apt-get update -y && apt-get install -y libmcrypt-dev openssl | |
RUN docker-php-ext-install pdo mcrypt mbstring | |
RUN apt-get -y curl | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
WORKDIR /app | |
COPY . /app |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Parcel Sandbox</title> | |
<meta charset="UTF-8" /> | |
<style> | |
.row { | |
display: flex; | |
} | |
.icon { |
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
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |
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
/** | |
<span class="spinner"></span> | |
<span class="spinner spinner-md"></span> | |
<span class="spinner spinner-lg"></span> | |
**/ | |
@keyframes spinner-rotate { | |
0% { | |
transform: rotate(0) | |
} |
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
const highlight_open = '<span>'; | |
const highlight_close = '</span>'; | |
const text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sed odio purus. Ut hendrerit quam id auctor aliquet. Nam et leifend purus, vel elementum nunc. Cras ac facilisis sem. Integer ullamcorper honcus iaculis. Praesent posuere dui tellus, sed interdum libero varius n. Nulla tristique pulvinar sem bibendum fermentum. In purus mi, viverra itae interdum ac, semper eu felis. Vivamus nisi ligula, consequat ut orci non, endrerit iaculis magna. Mauris a sapien fringilla, egestas dolor id, porta sapien. Praesent id magna et leo rutrum feugiat ac nec est. Vestibulum psum metus, interdum eget porttitor ut, feugiat ut diam. Mauris sed ultrices orci. Nam mollis in purus vitae elementum. Aliquam erat volutpat. Nulla pharetra gravida placerat. Nunc leo mauris, auctor a elit vitae, lacinia sollicitudin diam. Nunc porttitor varius tellus. Sed eu ullamcorper elit. Nam rutrum arcu id sodales vestibulum. Quisque fringilla, turpis in porta |
NewerOlder