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
// ==UserScript== | |
// @name Slack Web Auto Dark Mode | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Automatically toggle dark mode on web version of slack.com | |
// @author Danilo Azevedo | |
// @match https://app.slack.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=slack.com | |
// @grant none | |
// @license Apache-2.0 |
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\Repositories; | |
use Doctrine\ORM\EntityRepository; | |
use Doctrine\ORM\Internal\Hydration\IterableResult; | |
class UserRepository extends EntityRepository | |
{ | |
public function getUsersIterable(): IterableResult |
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
/** | |
* Range function, similar to python's one. | |
* If you want to use it in for...in loops, all 4 arguments must be passed. | |
* @param {Number} Start - If omited, it defaults to 0. | |
* @param {Number} Stop | |
* @param {Number} Step - If omited, it defaults to 1. | |
* @param {Boolean} Object - If returns an object or not. Mostly used in for...in loops. | |
* @return {Mixed} If Object is true, returns an object, otherwise, returns an array. | |
* | |
* Examples: |
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
/** | |
* Remove acentos de strings | |
* @param {String} string acentuada | |
* @return {String} string sem acento | |
*/ | |
var map={"â":"a","Â":"A","à":"a","À":"A","á":"a","Á":"A","ã":"a","Ã":"A","ê":"e","Ê":"E","è":"e","È":"E","é":"e","É":"E","î":"i","Î":"I","ì":"i","Ì":"I","í":"i","Í":"I","õ":"o","Õ":"O","ô":"o","Ô":"O","ò":"o","Ò":"O","ó":"o","Ó":"O","ü":"u","Ü":"U","û":"u","Û":"U","ú":"u","Ú":"U","ù":"u","Ù":"U","ç":"c","Ç":"C"}; | |
function removerAcentos(s){ return s.replace(/[\W\[\] ]/g,function(a){return map[a]||a}) }; |