Skip to content

Instantly share code, notes, and snippets.

View roelvangils's full-sized avatar

Roel Van Gils roelvangils

View GitHub Profile
@roelvangils
roelvangils / update
Created June 14, 2024 20:34
A Script that updates most of your CLI tools. Use carefully.
#!/bin/bash
# Setup log file
LOGFILE="$HOME/cli-updater.txt"
exec > >(tee -a "$LOGFILE") 2>&1
# Function to handle macOS software updates
update_macos() {
echo "Updating macOS itself…"
if command -v softwareupdate &>/dev/null; then
@roelvangils
roelvangils / querySelector.js
Created August 7, 2017 16:14
Easy proxy to querySelector in JS
var get = function (selector, scope) {
scope = scope ? scope : document;
return scope.querySelector(selector);
};
var getAll = function (selector, scope) {
scope = scope ? scope : document;
return scope.querySelectorAll(selector);
};
@roelvangils
roelvangils / 0_reuse_code.js
Created July 17, 2017 14:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@roelvangils
roelvangils / organigram-nl
Created April 30, 2013 12:37
HTML-equivalent (Nederlands) voor Organigram Infrabel
<!doctype html>
<html lang="nl">
<head>
<meta charset="utf-8" />
<title>Organigram (NL)</title>
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<style>
body { font: 14px/1.5em Calibri, Arial, Helvetica, sans-serif; color: #222; margin: 4em; }
a { color: #868ba2; text-decoration: none; border-bottom: 1px dotted #868ba2; }
a:hover, a:focus { border-bottom: 1px solid #868ba2; }