You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Dan Snow
dfsnow
Researcher @turquoisehealth. Formerly Director of Data Science @ccao-data. Focused on improving public goods and explaining complex systems.
Example for authenticating to Jellyfin API from Python
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
Getting Logitech F310 to work with Macbook USB-C port
Connect & use Logitech F310 with Macbook
Since my Macbook Pro only has USB-C port, I used an USB-A to USB-C adapter to connect my F310 to it, but it does not work (pressing MODE button does not turn on the LED).
How to
To make it work:
Disconnect F310 from Mac
On F310: switch X-input to D-input
Hold Logitech button (in the middle)
Connect F310 to Mac via adapter, now you can release the Logitech button.
How to Limit CPU and Memory Usage With Cgroups on Debian/Ubuntu
How to Limit CPU and Memory Usage With Cgroups on Debian/Ubuntu
Cgroups is a flexible Linux kernel feature to limit, police and account resources usage. A cgroup is a set of tasks for a subsystems, that is typically a resource controller.
A file system of type cgroup is mounted and all operations are run over it.
Installation
The installation can be done using any of libcgroup, cgmanager or systemd.
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
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
Makevars and instructions for installing installing data.table on an M1 Mac; note config also works for installing slam/syuzhet.
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
To start using the Jellyfin API, authorization is probably the first thing you'll need to do. Jellyfin's authorization options can be a bit confusing because there are a lot of deprecated options.
Generally there are three ways to authenticate: no authorization, user authorization with an access token or authorization with an API key. The first way is easy, just do nothing. But most often you'll need to use either the access token or API key.
Sending authorization values
There are multiple methods for transmitting authorization values, however, some are outdated and scheduled to be removed.
It's recommend to use the Authorization header. If header auth isn't an option, the token may be sent through the ApiKey query parameter. Sending secure data in a query parameter is unsafe as the changes of it leaking (via logs, copy-paste actions or by other means) are high. Only use this method as a last resort.
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