Skip to content

Instantly share code, notes, and snippets.

@keiya
keiya / README.md
Last active May 3, 2024 09:59
foobar2000 Accessing UPnP DLNA Example (also Python upnpclient example)

Generate M3U Playlist from foobar2000 UPnP/DLNA Server

I have many songs stored in foobar2000 on Windows, and I wanted to listen to them from other Macs or tablets. foobar2000 mac and foobar2000 mobile seemed suitable for this purpose, but it took a long time to list the songs. So I used this script to create a playlist in advance to save me the trouble.

How to use

  • step 0: create playlist in your foobar2000
  • step 1: install UPnP/DLNA Renderer, Server, Control Point in your foobar2000
    • and make some configuration
  • step 2: install pip packages
@alicekao
alicekao / axiosMockAdapterUse.js
Last active May 3, 2024 09:53
How to use axios mock adapter
// Fetch all places action to test in actions/index.js
import axios from 'axios';
export function fetchPlaces() {
return dispatch => {
return axios.get('/api/places/fetchAll')
.then(resp => {
dispatch(updatePlaces(resp.data));
})
.catch(err => {
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 3, 2024 09:53
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@tzmartin
tzmartin / ios.settings.schemes.md
Created January 13, 2016 18:27
iOS Settings URL Scheme List

Settings URL schemes:

Note: < i=OS 5.1 use prefs:. > 5.1 use app-settings:

  • app-settings:root=General&path=About
  • app-settings:root=General&path=ACCESSIBILITY
  • app-settings:root=AIRPLANE_MODE
  • app-settings:root=General&path=AUTOLOCK
  • app-settings:root=General&path=USAGE/CELLULAR_USAGE
  • app-settings:root=Brightness
@cedrickchee
cedrickchee / rust_resources.md
Last active May 3, 2024 09:46
Awesome Rust — a collection of resources for learning Rust

Awesome Rust

I learn Rust by reading The Rust Programming Language (aka. TRPL) book.

This is my mind map and collection of resources for learning Rust in early 2019.

I plan to continuously update this list if time allows in future. I will move this into its own GitHub repo or something more permanent when this grow.


@cgiosy
cgiosy / sort_by_angle.cpp
Last active May 3, 2024 09:45
각도로 정렬하기
auto m=partition(A.begin(), A.end(), [&](pii p) { return p<pii{}; });
sort(A.begin(), m, [&](pii a, pii b) { return cross(a, b)<0; });
sort(m, A.end(), [&](pii a, pii b) { return cross(a, b)<0; });
@the-crypt-keeper
the-crypt-keeper / 3060vs3060.md
Created May 2, 2024 17:59
RTX 3060 x1 vs x16 results on 4-bit quantized Llama 8B Instruct models

Enviroment setup

Test Host is an HP z640 with Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz

Device 0 is a GeForce RTX 3060 Lite Hash Rate (EVGA) connected via the cheapest USB x1 crypto mining riser I could find online.

Device 1 is a GeForce RTX 3060 (HP OEM) connected via an x16 PCIe 4.0 riser cable (although note that my host does not support past PCIe past 3.0)

tensorrt-llm 0.8.0

@bskinn
bskinn / intersphinx_mappings.txt
Last active May 3, 2024 09:39
Various intersphinx mappings
# The entries in this file are checked regularly for validity via the Github Action
# sited at github.com/bskinn/intersphinx-gist.
# Please feel free to post an issue at that repo if any of these mappings don't work for you,
# or if you're having trouble constructing a mapping for a project not listed here.
Python 3 [latest]: ('https://docs.python.org/3/', None)
Python 3 [3.x]: ('https://docs.python.org/3.9/', None)
attrs [stable]: ('https://www.attrs.org/en/stable/', None)
Django [dev]: ('https://docs.djangoproject.com/en/dev/', 'https://docs.djangoproject.com/en/dev/_objects/')
Flask [2.2.x]: ('https://flask.palletsprojects.com/en/2.2.x/', None)
@charlesaloaye
char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