Skip to content

Instantly share code, notes, and snippets.

View webketje's full-sized avatar
🏠
Working from home

Kevin Van Lierde webketje

🏠
Working from home
View GitHub Profile
@webketje
webketje / README.md
Last active December 18, 2024 12:56
Business Insider Subscribed - userscript

Business Insider subscribed - userscript

A Tampermonkey userscript you can use to read articles on businessinsider.com as if you were subscribed, that is - without paywall.

How does it work?

Business Insider subscribed hijacks the network request which otherwise loads the paywall. When the website API or code changes in areas relevant to this userscript, it may no longer work. If you find that the script no longer works, please report it in the comments below.

@webketje
webketje / README.md
Created November 27, 2022 22:39
Metalsmith auto-rebuild and browser sync

An example of how to implement (full) auto-rebuilds and browser sync with Metalsmith

@webketje
webketje / with-initial-scale.html
Last active September 29, 2021 08:34
How <meta name="viewport"> matters
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style>
* { box-sizing: border-box; }
html, body { background: #ccc; padding: 0; margin: 0; position: relative; }
#container { width: 960px; max-width: 100%; padding: 32px; margin: 32px auto; }
#contents { width: 600px; max-width: 100%; padding: 32px; margin: 0px auto; background: white; }
@webketje
webketje / package.json
Created August 14, 2020 17:00
metalsmith-resume
{
"name": "metalsmith-resume",
"version": "0.0.1",
"description": "A professional online & print resume powered by metalsmith",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"serve": "node_modules/.bin/serve dist",
"start": "node index && npm run serve"
},
@webketje
webketje / README.md
Last active January 26, 2025 14:43
Soundcloud Downloader Clean - Tampermonkey userscript OR bookmarklet

Tampermonkey userscript - Soundcloud Downloader Clean

An ad-less, multilingual, clean Soundcloud downloader with robust code. Adds a 'Download' button to all single track views.

Features

  • No third-party embeds, redirects or ads, directly uses the Soundcloud API.
@webketje
webketje / README.md
Last active January 10, 2025 06:35
Notepad++ extension: "Open Folder as workspace" context menu entry

Notepad++ extension: "Open Folder as workspace" context menu entry

Adds a context menu entry upon right-clicking folders to open the folder as a clean workspace in Notepad++, like many other modern editors allow.
Requires Notepad++ 7.8 or higher.

Screenshot

Install

Run install.cmd as administrator, or open regedit and manually import the .reg file.

@webketje
webketje / i18n_base.php
Last active February 10, 2017 23:19
GS UsrMgr - plugin permissions
<?php
if (myself(false) === 'load.php' && @$_GET['id'] === 'i18n_base') {
add_action('page-access', 'i18n_base_pages_access');
}
add_filter('permissions-css', 'i18n_base_permissions_css');
function i18n_base_pages_access() {
$usermgr = usermgr();
$current_user = current_user();
@webketje
webketje / CSS.css
Last active January 11, 2019 01:16
Anchorize JS - a Javascript plugin which turns HTML headings into clickable anchors for easy bookmarking and navigation
/* standard CSS. Add position:relative to elements which get an anchor hash */
html { scroll-behavior: smooth; }
.anchorize-hash { outline: none; text-decoration: none; position: absolute; left: 0; cursor: hand; cursor: pointer; color: inherit; opacity: 0.3; transition: opacity .1s; }
.anchorize-hash:hover { opacity: 1; }
h2, h3 { position: relative; padding-left: 1em; }
@webketje
webketje / create-element.js
Last active December 5, 2016 22:15
Superminimal virtual DOM utility
var vEl = function(element, options) {
var root = document.createElement(element);
for (var option in options) {
if (option === 'events') {
for (var event in options.events)
root.addEventListener(event, options.events[event], false);
} else if (option === 'children') {
for (var i = 0, len = options.children.length; i < len; i++)
root.appendChild(options.children[i]);
} else if (root.hasOwnProperty(option)) {
@webketje
webketje / ko.extenders.filters.js
Last active December 13, 2015 12:48
Knockout cumulative array filters extender
/**
* @module ko.extenders.filters
* @desc Allows for cumulative filters on Knockout observable arrays
* @version 1
* @author Kevin Van Lierde (Tyblitz)
* @license MIT license, Copyright (c) 2015, Kevin Van Lierde (https://opensource.org/licenses/MIT)
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd)