Skip to content

Instantly share code, notes, and snippets.

View luukverhoeven's full-sized avatar
🚀
To Infinity, And Beyond!

Luuk Verhoeven luukverhoeven

🚀
To Infinity, And Beyond!
View GitHub Profile
<?php
use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\AfterScenarioScope;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use Behat\Behat\Tester\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
<?php
$str = 'UPDATE mdl_grade_grades SET itemid = ?,userid = ?,rawgrade = ?,rawgrademax = ?,rawgrademin = ?,rawscaleid = ?,usermodified = ?,finalgrade = ?,hidden = ?,locked = ?,locktime = ?,exported = ?,overridden = ?,excluded = ?,timecreated = ?,timemodified = ?,aggregationstatus = ?,aggregationweight = ?,feedback = ?,feedbackformat = ?,information = ?,informationformat = ? WHERE id=?';
// Stackoverflow code. Quick and dirty solution to convert PDO mysql queries.
function sql_debug($sql_string, array $params = null) {
if (!empty($params)) {
$indexed = $params == array_values($params);
foreach($params as $k=>$v) {
if (is_object($v)) {
#aveticamenu-carousel .sectionimage{
display:none;
}
#aveticamenu-carousel .carousel-content .list-item{
opacity:1 !important;
}
#aveticamenu-carousel .marker-2 div div{
background-color:#575757;
height:10px;
}
<svg id="svgcontent" width="470" height="100" viewBox="0 0 470 100" overflow="visible" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g style="pointer-events:all">
<rect fill="#00C389" stroke="#00C389" x="10" y="30" width="60" height="10" fill-opacity="0.1" stroke-opacity="0.1"/>
<rect fill="#00C389" stroke="#00C389" x="75" y="30" width="60" height="10" fill-opacity="0.25" stroke-opacity="0.25"/>
<rect fill="#00C389" stroke="#00C389" x="140" y="30" width="60" height="10" fill-opacity="0.4" stroke-opacity="0.4"/>
<rect fill="#00C389" stroke="#00C389" x="205" y="30" width="60" height="10" fill-opacity="0.55" stroke-opacity="0.55"/>
<rect fill="#00C389" stroke="#00C389" x="270" y="30" width="60" height="10" fill-opacity="0.7" stroke-opacity="0.7"/>
<rect fill="#00C389" stroke="#00C389" x="335" y="30" width="60" height="10" fill-opacity="0.95" stroke-opacity="0.95"/>
{
"type": 1,
"title": "Chrome",
"description": "Chrome",
"logo": "https://cloudinovasi.id/assets/img/logos/nginx.png",
"image": "selenium/standalone-chrome",
"ports": [
"4444:4444/tcp"
]
}
@luukverhoeven
luukverhoeven / block-myoverview.css
Created July 6, 2018 11:30
Styling block-myoverview
.block-myoverview .btn-group {
float: left;
margin-left: 25px;
}
.block-myoverview .pagination ul {
float: left;
margin-left: 5px;
}
<?php
# handy Moodle snippets
# Config catch all mails.
$CFG->divertallemailsto = '[email protected]';
# Force debugging.
@ini_set('display_errors', '1');
$CFG->debug = 32767;
$CFG->debugdisplay = true;
@luukverhoeven
luukverhoeven / moodle-privacy-test.php
Last active January 9, 2025 18:39
Moodle privacy testing tool
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@luukverhoeven
luukverhoeven / phpstorm.vmoptions
Last active January 31, 2025 18:04
My Phpstorm vmoptions + idea.properties
-ea
-server
-Xms512m
-Xmx2g
-XX:ParallelGCThreads=8
-XX:PermSize=350m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:LargePageSizeInBytes=256m
-XX:+UseConcMarkSweepGC
@luukverhoeven
luukverhoeven / arduino_wallE3.ino
Last active April 22, 2018 08:59
Arduino robot code v3
/**
Wall E robot car avoid objects
@Version: 3.0.0
@Since 22-nov-2016
@Author : Luuk Verhoeven
*/
#include <Servo.h>
#include <NewPing.h>