Skip to content

Instantly share code, notes, and snippets.

View DennisdeBest's full-sized avatar

Dennis de Best DennisdeBest

View GitHub Profile
@DennisdeBest
DennisdeBest / script.js
Created October 15, 2023 12:52
Human Benchmark WPM
// ==UserScript==
// @name Human benchmark typing
// @version 1
// @grant none
// @match https://humanbenchmark.com/tests/typing
// ==/UserScript==
const typeText = async (text, targetDiv) => {
for (const ch of text) {
@DennisdeBest
DennisdeBest / script.js
Last active October 15, 2023 12:51
Human Benchmark Number Test GreaseMonkey Script
// ==UserScript==
// @name HumanBenchmark number
// @version 1
// @grant none
// @match https://humanbenchmark.com/tests/number-memory
// ==/UserScript==
const getParentDiv = () => {
const $parentDivs = document.getElementsByClassName('number-memory-test');
if ($parentDivs.length === 0) {
@DennisdeBest
DennisdeBest / kek.php
Last active November 30, 2020 10:47
kek
<?php
namespace App\Model;
use App\Entity\Adresse;
use App\Entity\Client;
use App\Entity\DetailsDevis;
use App\Entity\Entreprise;
use App\Entity\Produit;
# docker-compose.yml
version: '3.7'
networks:
default:
name: local
services:
mysql:
image: mysql:5.7
@DennisdeBest
DennisdeBest / thumbnailSlider.js
Created August 2, 2018 09:32
JS thumbnail slider
/**
* Initiliaze the thumbnailslider
*/
$(document).ready(() => {
new thumbnailSlider();
});
/**
* Thumbnail slider for products with more then a configurable amount of images (3 by default)
*/
@DennisdeBest
DennisdeBest / filters.js
Created August 1, 2018 15:51
sticky search filters
//Apply filter behaviour after the document is finished loading
$(document).on('as4-After-Document-Ready', () => {
new Filters()
});
/**
* Controls the bevahiour of the filter container
*/
class Filters {
constructor() {
@DennisdeBest
DennisdeBest / logic-immo.js
Created October 11, 2017 08:53
GreaseMonkey script to clean logic-immo.com and remove the scam ads
// ==UserScript==
// @name LogicImmo
// @namespace hide stuff
// @description Hide scams
// @include http://www.logic-immo.com/*
// @version 1
// @grant none
// ==/UserScript==
//Remove useless stuff
//
// PoneyContainer.swift
// PetitPonaay
//
// Created by Developer on 20/03/2017.
// Copyright © 2017 Developer. All rights reserved.
//
import Foundation
def minion_game(string):
wordlistKevin = []
vowels = ['A', 'E', 'I', 'O', 'U']
scoreKevin = 0
scoreStuart = 0
for i in range (0, len(string)):
for j in range(i+1, len(string)+1):
if string[i] in vowels:
scoreKevin += 1
else:
def print_rangoli(size):
lineWidth = 3 + (4*(size-1)) - 2
chars = []
for i in range(0, size):
chars.append(chr(96+size-i))
counter = 0
s = ""
sarr = []
for val in chars:
if counter == 0 :