Skip to content

Instantly share code, notes, and snippets.

Avatar

Viktor Klang (√) viktorklang

View GitHub Profile
@viktorklang
viktorklang / gist:f1f60e7a7481671132755d024be8d91b
Created Sep 3, 2021
Improving MacBook trackpad sensitivity
View gist:f1f60e7a7481671132755d024be8d91b
defaults write -g com.apple.trackpad.scaling -float 5.0
@viktorklang
viktorklang / SlackLauncher.sh
Created Jul 16, 2019
Launcher script for Slack on macOS which warns you if you open if while on battery power
View SlackLauncher.sh
#!/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 Dec 19, 2018 — forked from fwbrasil/doc.md
Scala `Future` optimizations (8/8/2018 snapshot)
View doc.md

Scala Future optimizations


Flavio W. Brasil, July 2017

Problem


@viktorklang
viktorklang / Instructions.txt
Created Oct 8, 2017
Try the latest Scala Future impl!
View Instructions.txt
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
View keybase.md

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
Adds all your sbt target dirs as path excludes for Time Machine
View exclude_targetdirs.sh
#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 Jan 7, 2017 — 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)
View reclaimWindows10.ps1
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# 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 Dec 11, 2016
Emergency audio reset on OS X / macOS when faced with loss of audio
View restart_audio.sh
#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 Sep 20, 2016 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist
View service-checklist.md

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?