Skip to content

Instantly share code, notes, and snippets.

@machielg
machielg / apple_support.csv
Created May 16, 2021 18:22
Apple Music Services Fanboy Checklist
Service Watch App Carplay App Stream in Carplay
Tidal No Yes No
Apple Yes Yes Yes
Qobuz No Yes No
Deezer Yes Yes Yes
Amazon No No -
Spotify Yes Yes Yes
@machielg
machielg / tidal_qobuz_apple_deezer_amazon.csv
Last active May 16, 2021 19:43
Tidal vs Qobuz vs Apple vs Deezer vs Amazon vs Spotify
Service Library Quality Desktop App Algorithm Desktop Memory Price
Tidal 8/10 Lossy Good Good 450MB €10-20
Apple 10/10 Lossy Great Good 200MB €10
Qobyz 6/10 High Res Meh No algorithms 400MB €15
Deezer 9/10 Losless Good Good 250MB €10-15
Amazon 7/10 Lossy Okay No algorithms 450MB €10
Spotify 10/10 Lossy Good Great 500MB €10
@machielg
machielg / api.json
Last active November 3, 2020 09:52
{
"request": {
"customer_number": 12345678,
"request_date": "2020-19-10 11:01:55"
},
"insights": {
"ds_ingress": {
"score_date": "2020-18-10",
"score_datetime": "2020-18-10 13:12:05",
"ds_ingress": true,
Brand Model Apps Specs Bluetooth Weight
FiiO M5 None 4.2 38
FiiO M6 Tidal/Spotify/Qobuz/Deezer 4.2 83
HiBy R3 Tidal/Qobuz MQA 4.1 95
HiBy R3 Pro Tidal/Qobuz MQA 5.0 95
Hidizs AP80 None 4.0 70
Hidizs AP80 Pro None 4.2 68
Shanling M0 None 4.1 38
Shanling M2x Tidal 4.2 147
Shanling M6 Android 4.2 228
import unittest
from test1 import Test1
from test2 import Test2
loader = unittest.TestLoader()
suite = unittest.TestSuite()
suite.addTest(loader.loadTestsFromTestCase(Test1))
suite.addTest(loader.loadTestsFromTestCase(Test2))
@machielg
machielg / dkr
Last active November 22, 2018 10:23
A wrapper shell script to use a virtualbox image for running the docker daemon on MacOS, uses docker-machine
#!/bin/bash
if ! [ -x "$(command -v docker-machine)" ]; then
echo 'docker-machine not installed'
brew install docker-machine
fi
if ! [ -x "$(command -v docker)" ]; then
echo 'docker client not installed'
brew install docker
fi
import io.crystalline.jigsaw.client.Client;
import io.crystalline.jigsaw.repo.SimpleCustomerRepository;
public class Application {
public static void main(String[] args) {
SimpleCustomerRepository repo = new SimpleCustomerRepository();
Client client = new Client(repo);
client.demonstrate();
}
public class SimpleCustomerRepository implements CustomerRepository {
@Override
public Iterable<Customer> allCustomers() {
SimpleCustomer customer1 = new SimpleCustomer(1, "John Doe");
return Arrays.asList(customer1);
}
}
public class SimpleOrderRepository implements OrderRepository {
interface Customer {
String getName();
String getId();
}
interface CustomerRepository {
Stream<Customer> allCustomers();
}
interface Order {
public class Client {
public Client(CustomerRepository customerRepo, OrderRepository orderRepo) {
this.customerRepo = customerRepo;
this.orderRepo = orderRepo;
}
public void demonstrate() {
customerRepo.allCustomers().forEach(customer -> {
List<Order> orders = orderRepo.getOrdersForCustomer(customer.getId());