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 { Router } = require('express') | |
const ensureAuth = require('../middleware/ensureAuth') | |
const ensureHasPermissions = require('../middleware/ensureHasPermissions') | |
const bankController = require('../controllers/bankController') | |
const router = Router() | |
router.use('/', ensureAuth) | |
router.get('/', ensureHasPermissions('banks.read'), bankController.getAll) | |
router.get('/:id', ensureHasPermissions('banks.read'), bankController.getOne) |
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
// ref: https://stackoverflow.com/a/57503796/4158755 | |
// Thanks to Yassine! | |
function getCssSelector(el) { | |
const names = [] | |
do { | |
let index = 0 | |
let cursorElement = el |
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
class Listener { | |
final String eventName; | |
final void Function([Object]) callback; | |
Listener(this.eventName, this.callback); | |
} | |
class EventEmitter { | |
final _listeners = <Listener>[]; |
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
class EventEmitter { | |
constructor() { | |
this.listeners = [] | |
} | |
addListener(event, listener) { | |
this.listeners.push({ event, listener }) | |
} | |
removeListener(event, listener) { |
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
module.exports = (req, res, next) => { | |
if (!req.file) { | |
res.status(422).json({ message: 'The file is required.' }); | |
} else { | |
next(); | |
} | |
} |
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/material.dart'; | |
import './custom_searchable_dialog.dart'; | |
import './custom_text_field.dart'; | |
class CustomSearchableItem<T> { | |
final String label; | |
final T value; | |
CustomSearchableItem({ | |
@required this.label, |
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
[account] | |
first_login_game = 0 | |
[settings] | |
open_music = 1 | |
voice_language = english | |
graphic_lvl_reported = 1 | |
match_type = 100004 | |
[basic_setting] |
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" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Buzzr: Fale com desconhecidos</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
</head> | |
<body> |
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
// ==UserScript== | |
// @name Fuck you useless comments! | |
// @namespace http://tampermonkey.net/ | |
// @version 0.0.1 | |
// @description Remove useless comments from Facebook. | |
// @author Renan Coelho <[email protected]> | |
// @match https://www.facebook.com/* | |
// @grant none | |
// ==/UserScript== |
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 | |
namespace App\Validator; | |
use Carbon\Carbon; | |
class CustomValidator extends \Illuminate\Validation\Validator { | |
protected function getTimePeriods($parameter) { | |
$keys = array_keys(trans('validation.time_periods')); | |
$values = array_values(trans('validation.time_periods')); |