Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / example.js
Created March 18, 2019 20:59
Build your own RxJS
function createObservable(subscribe) {
return {
subscribe,
pipe: function(operator) {
return operator(this);
},
};
}
const numberObservable = createObservable(function(observer) {
@FrankSpierings
FrankSpierings / frida.py
Created March 24, 2019 13:05
Ghidra Plugin - Generate Frida Hooks - Requires Oneshot Decompiler Parameter ID
#TODO write a description for this script
#@author
#@category _NEW_
#@keybinding
#@menupath
#@toolbar
#TODO Add User Code Here
def getFunctions():
@padeoe
padeoe / README_hfd.md
Last active May 6, 2024 03:09
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@mortenson
mortenson / sams_portland_stuff.md
Last active May 6, 2024 03:08
Sam's fun things to do in Portland

Portland recommendations by Sam

Sorted by location-ish. I tried to reduce the list to places I think are good for visitors vs. my absolute favorites, but I put a section at the bottom for places that may not be for everyone.

Breakfast / Brunch

Toki Restaurant (Downtown)

580 SW 12th Ave

My order: Grilled mackerel breakfast with a bloody mary. Their Dalgona coffee is quite good too.

@nielsvanvelzen
nielsvanvelzen / jf-dev-auth.md
Last active May 6, 2024 03:07
Jellyfin API Authorization

Jellyfin API Authorization

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.

@dbisso
dbisso / state.js
Last active May 6, 2024 03:06
Simple state management in vanilla JS
function State() {
this.actions = {};
this.subscriptions = [];
this.history = [];
}
State.prototype.subscribe = function(element, action, callback) {
this.subscriptions[action] = this.subscriptions[action] || [];
this.subscriptions[action].push(function(data) {
callback.apply(element, data);
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active May 6, 2024 03:05
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@andytlr
andytlr / spotify-genres.md
Created January 22, 2016 02:26
Spotify Genres

Spotify has heaps of genres but there not surfaced in the UI. Here's 1383 (perhaps all) of them.

Search for genre:"Genre Name"

  1. A Cappella
  2. Abstract
  3. Abstract Beats
  4. Abstract Hip Hop
  5. Abstract Idm
  6. Abstractro
@mandreko
mandreko / README.md
Last active May 6, 2024 02:54 — forked from joltcan/README.md
Prusa Connect Webcam upload

From Nunos great instructions

Instructions

  1. Go to the Cameras section at https://connect.prusa3d.com
  2. Add a new camera.
  3. Click the QR code link
  4. Click "Start Camera"
  5. Open your browser's inspector window and look for the "/snapshot" request.
  6. Copy the "Fingerprint" and "Token" headers into the file below.