Skip to content

Instantly share code, notes, and snippets.

View viktorklang's full-sized avatar

Viktor Klang (√) viktorklang

View GitHub Profile
@viktorklang
viktorklang / gist:f1f60e7a7481671132755d024be8d91b
Created September 3, 2021 10:54
Improving MacBook trackpad sensitivity
defaults write -g com.apple.trackpad.scaling -float 5.0
@viktorklang
viktorklang / SlackLauncher.sh
Created July 16, 2019 08:42
Launcher script for Slack on macOS which warns you if you open if while on battery power
#!/usr/bin/env bash
if [[ $(pmset -g ps | head -1) =~ "Battery Power" ]]; then
osascript -e 'display notification "You are starting Slack while running on battery power" with title "Battery Drain Source Detected" subtitle ""'
fi
open /Applications/Slack.app
@viktorklang
viktorklang / doc.md
Created December 19, 2018 16:03 — forked from fwbrasil/doc.md
Scala `Future` optimizations (8/8/2018 snapshot)

Scala Future optimizations


Flavio W. Brasil, July 2017

Problem


@viktorklang
viktorklang / Instructions.txt
Created October 8, 2017 13:01
Try the latest Scala Future impl!
First: Close all other applications, so that they don't interfere with the benchmark.
Second: Make sure that your computer is adequately cooled during the benchmark so it doesn't start thermal throttling.
Third: clone https://github.com/viktorklang/scala-futures/
Fourth: git checkout wip-optimizations-√
Fifth: start sbt

Keybase proof

I hereby claim:

  • I am viktorklang on github.
  • I am viktorklang (https://keybase.io/viktorklang) on keybase.
  • I have a public key ASD8bMnlRJBBEHVUgA0_fuzExfoV__wn6K6teoI6d3QDKwo

To claim this, I am signing this object:

@viktorklang
viktorklang / exclude_targetdirs.sh
Last active May 14, 2018 07:39
Adds all your sbt target dirs as path excludes for Time Machine
#WARNING: Use at your own risk. No warranties expressed or implied. YMMV. Drive responsibly. Eat healthy.
#First, `cd` into the parent dir for all of your `sbt`/`maven` projects (I assume you have one of those)
find "$(cd ..; pwd)" -type d -name "target" -print0 | sudo xargs -0 tmutil addexclusion -p
@viktorklang
viktorklang / reclaimWindows10.ps1
Created January 7, 2017 20:21 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <[email protected]>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@viktorklang
viktorklang / restart_audio.sh
Created December 11, 2016 08:05
Emergency audio reset on OS X / macOS when faced with loss of audio
#Use at your own risk. No warranties expressed or implied. YMMV. Drive responsibly. Eat healthy.
#for ZSH, I typically put these in my .zshrc
function restart_audio() {
command sudo killall coreaudiod &&
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist &&
sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist &&
echo 'Audio daemon restarted'
}
@viktorklang
viktorklang / service-checklist.md
Created September 20, 2016 12:06 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?