Skip to content

Instantly share code, notes, and snippets.

<script>
// stolen from https://electrictoolbox.com/pad-number-two-digits-javascript/
function pad(number) {
return (number < 10 ? '0' : '') + number;
}
function set_random_image(artwork_id, image_count){
// Generate a random index
random_index = Math.ceil(Math.random() * image_count);
// ceil in plaats van floor zodat het niet bij 0 maar 1 begint en eindigt bij het aantal plaatjes
function rentalsToCalendar() {
var spreadsheet = SpreadsheetApp.getActiveSheet();
var calendarId = spreadsheet.getRange("C4").getValue();
var eventCal = CalendarApp.getCalendarById(calendarId);
var rentalList = spreadsheet.getRange("A8:C12").getValues();
for (x=0; x<rentalList.length; x++) {
.box2 {
width: 750px;
height: 450px;
margin-left: auto;
margin-right: auto;
background: #24333f;
position: absolute;
z-index: 0;
}
{
"things": [
{
"descriptor": "Japanese jazz",
"title": "Early Summer - 福居良",
"type": "thing song",
"url": "https://open.spotify.com/track/3ven4ZKSspshBwiLMMibEa"
},
{
"descriptor": "Japanese jazz",
@FMJansen
FMJansen / index.html
Last active May 4, 2020 16:09
Tips EJW code :D
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Eerstejaarsweekend 2020</title>
<link rel="shortcut icon" href="./Images/Logo.png"/> <!-- je hebt hier een ‘trailing slash’ (de / voor >), die hoeft niet -->
<meta charset="utf-8"> <!-- deze is dubbel! -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="./main.css">
@FMJansen
FMJansen / rooms.js
Created September 28, 2019 11:27
This function is called on the page containing the iframe with the booking/calendar page.
(function ($) {
var locationInterval,
previousLocation;
window.calendarSubmittedInWindow = function (externalWindow) {
if (locationInterval) {
clearInterval(locationInterval);
locationInterval = undefined;
}
@FMJansen
FMJansen / book-room.js
Last active September 30, 2019 09:57
This function is called on the booking/calendar page.
(function($) {
$(function() {
$('form.cart').submit(function() {
parent.calendarSubmittedInWindow(window);
window.parent.postMessage("https://sherlocked.nl/checkout/");
});
});
})(jQuery);
@FMJansen
FMJansen / keybase.md
Created September 12, 2019 17:36
Keybase proof

Keybase proof

I hereby claim:

  • I am fmjansen on github.
  • I am fmjansen (https://keybase.io/fmjansen) on keybase.
  • I have a public key whose fingerprint is 4C12 E682 ACAD 21B1 61A8 AC18 F864 DF08 E4F0 9E58

To claim this, I am signing this object:

<?php
$lassie_event = Lassie::getModel('event_model', 'get_open_events', array('public_only' => false) );
// returns
// stdClass Object ( [27] => stdClass Object ( [id] => 27 [active] => 1 [name] => Speciaalbier-Kafee [open_date] => 2019-05-31 00:00:00 [start_date] => ... (etc.)
$lassie_event = Lassie::getModel('event_model', 'get_event_by_id', array('id' => 27) );
// returns
// stdClass Object ( [classname] => ReflectionException [message] => Internal error: Failed to retrieve the default value ) [status_code] => 500 )