Skip to content

Instantly share code, notes, and snippets.

View ChewRafa's full-sized avatar
😱
Learning More

ChewRafaDev ChewRafa

😱
Learning More
View GitHub Profile
@ZeroDragon
ZeroDragon / rando.js
Created June 1, 2022 02:16
True Random Generator
/**
* This small gist is based on https://github.com/nastyox/Rando.js
* The idea of this gist is to have a compatible node and browser script that can replace Math.random()
* using crypto libraries built-in in node and browser and without the extra baggage for automatic object
* array o string behaviours
* it fallbacks to Math.random()
**/
const rando = () => {
try {
@jmolivas
jmolivas / DefaultController.php
Last active August 20, 2022 18:57
Drupal 8 example: How to render a Twig template and load a CSS file from a Controller
<?php
namespace Drupal\acme\Controller;
use Drupal\Core\Controller\ControllerBase;
class DefaultController extends ControllerBase
{
/**