A simple benchmark library to benchmark js functions without installing 1go of depedencies.
Nodejs: 6.x.x, 7.x.x, 8.x.x, 9.x.x
/** | |
* Open a random restaurant page from the current deliveroo page. | |
*/ | |
function pickARestaurant() { | |
const restaurants = Array.from(document.getElementsByTagName('a')).filter(x => x.children[0] && x.children[0].className.includes("RestaurantCard")).map(x => x.href); | |
window.open(restaurants[Math.round(Math.random() * restaurants.length)]); | |
} |
/** | |
* Download all Humble bundle items of a specific type (eg: EPUB). | |
* @param {String} innerText The tag of the items to download. | |
*/ | |
function downloadAllBundleItems(innerText) { | |
return Array.from(document.getElementsByTagName('a')).filter(x => x.innerText == innerText).forEach(x => window.open(x.href)); | |
} |
# Copyright (c) 2018 Guillaume Mousnier | |
# | |
# MIT License | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, | |
# distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so, subject to |
#! /bin/bash | |
# Copyright (c) 2018 Guillaume Mousnier | |
# | |
# MIT License | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, | |
# distribute, sublicense, and/or sell copies of the Software, and to |
/* | |
The MIT License (MIT) | |
Copyright (c) 2017 Guillaume Mousnier | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 Guillaume Mousnier | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 Guillaume Mousnier | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
#!/usr/bin/env runhaskell | |
-- | |
-- The MIT License (MIT) | |
-- | |
-- Copyright (c) 2016 Guillaume Mousnier | |
-- | |
-- Permission is hereby granted, free of charge, to any person obtaining a copy | |
-- of this software and associated documentation files (the "Software"), to deal | |
-- in the Software without restriction, including without limitation the rights | |
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Hello React + D3!</title> | |
<!-- React --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react.min.js" type="text/javascript" ></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.0/react-dom.min.js" type="text/javascript" ></script> | |
<script src="http://npmcdn.com/[email protected]/browser.min.js"></script> |