Skip to content

Instantly share code, notes, and snippets.

Mathias Fredriksson mafredri

Block or report user

Report or block mafredri

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View patch-edid.rb
# Create display override file to force Mac OS X to use RGB mode for Display
# see
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
sindresorhus /
Last active Nov 14, 2019
shell function for publishing node modules with some goodies
# npm publish with goodies
# prerequisite: `npm install -g trash`
# `np` with an optional argument `patch`/`minor`/`major`/`<version>`
# defaults to `patch`
np() {
trash node_modules &>/dev/null;
git pull --rebase &&
npm install &&
npm test &&
npm version ${1:-patch} &&
josephholsten / sizeup.lua
Last active Mar 12, 2019
SizeUp in Hammerspoon
View sizeup.lua
-- === sizeup ===
-- SizeUp emulation for hammerspoon
-- To use, you can tweak the key bindings and the margins
local sizeup = { }
-- Bindings --
harlow /
Last active Jan 25, 2020
Job queues in Golang
jlongster /
Last active Dec 4, 2019
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

nf / analyze.go
Last active Jan 12, 2016
'spent' script to log where time is spent
View analyze.go
package main
import (
MawKKe /
Last active Feb 13, 2020
dm-crypt + dm-integrity + dm-raid = awesome!
#!/usr/bin/env bash
# Author: Markus (MawKKe)
# Date: 2018-03-19
# What?
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
getify /
Created Mar 12, 2019
Building That Better Web

Building That Better Web

In honor of the 30th anniversary of the web, I wanted to share a few thoughts about what a better web could aspire to be, and challenge us to move toward it.

The Worser Web

It's tempting to frame "better" simply in terms of improvement and progress, as in how far the web has come over the last 20+ years. As a developer, I like many others get all too excited about fancy new features like Service Workers, WebRTC, and yes, even CSS Grids. The pace of change is dizzying, but it feels like a great problem to have too many awesome features to learn and use!

So in one practical respect, a better web is one that empowers developers and users alike to express themselves and connect with others more fluently.

Last active Feb 16, 2020
Guide: Running Arch on a 2018 MacBook Pro

Hardware Prerequisites

You'll need at least the following hardware:

  • At least 3 USB-A to USB-C converters or hub with enough ports for at least 3 USB devices if all your devices are USB-A then:
  • A USB drive
  • A USB keyboard
  • USB to Ethernet adapter, compatible USB dongle or USB tethering on a phone
You can’t perform that action at this time.