If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final case class PasswordValue(value: String) { | |
override def toString = "PasswordValue(****)" | |
} | |
object SafePassword { | |
def resource[F[_]: Sync](value: String): F[Resource[F, PasswordValue]] = | |
for { | |
used <- Ref.of[F, Boolean](false) | |
chars = value.toCharArray | |
givePasswordAndNullify = Sync[F].delay { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I rarely use make, probably a better way to do some/all of this? | |
SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk | |
SOURCES=main.swift | |
EXECUTABLE=main | |
all: | |
swiftc -sdk $(SDK) $(SOURCES) -o $(EXECUTABLE) | |
clean: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install tinydns (djbdns) & daemontools on ubuntu 14.04 | |
apt-get -y install daemontools | |
apt-get -y install daemontools-run | |
apt-get -y install ucspi-tcp | |
apt-get -y install djbdns | |
mkdir -p /etc/service | |
# NOTE: installing daemontools-run takes care of this, else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> runMain ammonite.repl.Repl | |
[info] Running ammonite.repl.Repl | |
Loading Ammonite Repl... | |
@ load.ivy("com.chuusai" %% "shapeless" % "2.1.0") | |
@ import shapeless._ | |
import shapeless._ | |
@ 1 :: "lol" :: List(1, 2, 3) :: HNil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2015 Viktor Klang | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Show[A] | |
// These formulations all compile. | |
class A { | |
implicit def z1[A]: Show[A] = null | |
def f[A](implicit z: Show[A]): String = null | |
f | |
f[Int] | |
f[Int](implicitly) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"named_patterns" : { | |
"first_equal" : " = (?:.*?[^{]$)/f", | |
"first_comma" : ", /f", | |
"first_colon" : ": /f", | |
"all_space" : "\\s+/l1l0", | |
"hocon" : ": (?:.*?[^{]$)/r1l1l1f", | |
"typed" : "[:]/r0c1l1f", | |
"bash_var" : "[$][(]|[|][|]|[)]|[#]", | |
"sbt_operator" : "[&|@#<+:~]+[=][ ]/r1c1l1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2014 Juergen Pfundt | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
NewerOlder