Skip to content

Instantly share code, notes, and snippets.

View DennisdeBest's full-sized avatar

Dennis de Best DennisdeBest

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Text.RegularExpressions;
namespace Generator
{
@DennisdeBest
DennisdeBest / get next element XMLReader
Created January 27, 2017 09:00
Iterate over elements using the XMLReader class
$xmlReader = new XMLReader();
$xmlReader->open(dirname(__FILE__) . self::XML_FILE_PATH);
while ($element = $this->getNextElementFromXML($xmlReader, "Rubrique")) {
}
/**
* return an array of the next element specified
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 :
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:
//
// PoneyContainer.swift
// PetitPonaay
//
// Created by Developer on 20/03/2017.
// Copyright © 2017 Developer. All rights reserved.
//
import Foundation
@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
@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 / 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)
*/
# docker-compose.yml
version: '3.7'
networks:
default:
name: local
services:
mysql:
image: mysql:5.7
@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;