Skip to content

Instantly share code, notes, and snippets.

@iiLaurens
iiLaurens / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../paper-calculator/paper-calculator.html">
<polymer-element name="my-element">
@iiLaurens
iiLaurens / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../paper-calculator/paper-calculator.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@iiLaurens
iiLaurens / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">
<template>
@iiLaurens
iiLaurens / designer.html
Created December 11, 2014 21:28
designer
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
@iiLaurens
iiLaurens / grab_course.py
Last active August 29, 2015 14:27
Memrise course collector
from lxml import html
import os.path
import requests
from BeautifulSoup import BeautifulSoup
# Find the ID of your course and use the function get_course(course_id).
# The ID can be found in the URL of the course page, for example:
# http://www.memrise.com/course/169732/ttmik-talk-to-me-in-korean-level-3/
# where 169732 is the ID of this course.
# Example use:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Script './isorespin.sh' called with '-i lubuntu-17.04-desktop-amd64.iso -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -s 200MB -k v4.12' ...
Work directory 'isorespin' used ...
ISO '/home/laurens/Downloads/lubuntu-17.04-desktop-amd64.iso' respun ...
Kernel boot parameters 'persistent' added ...
Bootmanager 'rEFInd' added ...
Kernel updated with mainline kernel version '4.12.0-041200-generic' ...
Local package '/home/laurens/Downloads/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/laurens/Downloads/linuxium-install-UCM-files.sh' added ...
File '/home/laurens/Downloads/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/laurens/Downloads/linuxium-install-broadcom-drivers.sh' added ...
@iiLaurens
iiLaurens / fot bootloader.sh
Last active July 8, 2017 20:35
Spinning and installing Ubuntu flavour on Intel Atom device
sudo -i
# create mountpoints for the EFI partitions of the harddisk and USB
# Note that your USB device might have a different reference (but generally something like /dev/sdX1)
mkdir /mnt/bootusb
mkdir /mnt/bootdisk
mount /dev/sda1 /mnt/bootusb
mount /dev/mmcblk1p1 /mnt/bootdisk
# Remove the existing bootloader from the hard drive
@iiLaurens
iiLaurens / generate.py
Last active November 2, 2022 16:17
Blackjack Markov Decision Process generator for python MDPToolBox
import numpy as np
import pandas as pd
from itertools import product
from functools import reduce
ACTIONLIST = {
0: 'skip',
1: 'draw'
}
@iiLaurens
iiLaurens / code.js
Last active July 16, 2024 15:42
Get all clickable elements on a page
window.scrollTo(0, 0)
var bodyRect = document.body.getBoundingClientRect();
var items = Array.prototype.slice.call(
document.querySelectorAll('*')
).map(function(element) {
var rect=element.getBoundingClientRect();
return {
element: element,
include: (element.tagName === "BUTTON" || element.tagName === "A" || (element.onclick != null) || window.getComputedStyle(element).cursor == "pointer"),