curiouser / cakeThief.js

0 beğeniler
0 çatallar
1 dosyalar
Son aktivite 2 months ago
A solution to this code challenge: https://www.interviewcake.com/question/javascript/cake-thief
1 class Bag {
2 constructor (capacity) {
3 this.capacity = capacity;
4 this.cakes = [];
5 this.weight = 0;
6 this.value = 0;
7 }
8
9 addCake (cake) {
10 this.cakes.push(cake);

curiouser / itunes.py

0 beğeniler
0 çatallar
1 dosyalar
Son aktivite 2 months ago
Script to load an iTunes Media Library.xml, find duplicate tracks, remove the track with a larger file size and ensure that the remaining track inherits the older track_id
1 import json
2 import os
3 import re
4 from xml.etree import ElementTree
5
6 def get_track_attr (track, attr_name):
7 # iterate over each attr to find the filename
8 attributes = list(track)
9 for a in range(len(attributes)):
10 attr = attributes[a]

curiouser / arm64-bionic-zfs

0 beğeniler
0 çatallar
1 dosyalar
Son aktivite 2 months ago
Configuration for a fresh Ubuntu 18.04 Rock64 install. Adds a user, sets timezone, installs zfs, samba, configures disk power management, etc
1 #!/bin/bash
2
3 #
4 # Read this script and modify it before running. It's not tested as is and is not
5 # meant to be run unsupervised.
6 #
7
8 hostname='YOUR_DESIRED_HOSTNAME'
9 user='YOUR_USERNAME'
10 hdd_spindown_timeout=1800
Daha yeni Daha eski