Skip to content

Instantly share code, notes, and snippets.

View joelhinz's full-sized avatar

Joel Hinz joelhinz

  • Falkenberg, Sweden
View GitHub Profile
<?php
/**
* Render the view partial for the side component.
*
* @return string
*/
public function renderView()
{
$data = [
// ==UserScript==
// @name Bet365 reality checker
// @version 0.1
// @namespace joelhinz
// @description Automatically click on "Förbli inloggad"
// @author Joel
// @include https://members.bet365.com/*
// @grant none
// ==/UserScript==
export function bemify(block, modifiers) {
return block + ' ' + modifiersToArray(modifiers)
.map(modifier => `${block}--${modifier}`)
.join(' ');
}
function modifiersToArray(modifiers) {
if (!modifiers) {
return []
}
export function bemify(block, modifiers) {
if (!modifiers) {
return block;
}
if (typeof modifiers == 'object' && !Array.isArray(modifiers)) {
modifiers = Object.keys(modifiers).filter(modifier => modifiers[modifier])
}
if (typeof modifiers == 'string') {
<?php
namespace App\Some\Path;
class ShortTermMemory
{
private $store = [];
public function set($key, $value)
{