Skip to content

Instantly share code, notes, and snippets.

View tuus-amicus's full-sized avatar
🎯
Sublimating

Dee tuus-amicus

🎯
Sublimating
View GitHub Profile
@tuus-amicus
tuus-amicus / collections.kt
Created April 16, 2020 12:35 — forked from bastman/collections.kt
kotlin: How to join 2 collections by a foreign key predicate
data class Off(val id: Int, val offName: String)
data class Prop(val id: Int, val propName: String, val offId: Int)
data class Joined(val off: Off, val props: List<Prop>)
fun main(args: Array<String>) {
val offs: List<Off> = listOf(
Off(id = 1, offName = "Off A"),
Off(id = 2, offName = "Off B")
)
val props: List<Prop> = listOf(
@tuus-amicus
tuus-amicus / submodule-pull.sh
Created November 11, 2019 11:47 — forked from stephenparish/submodule-pull.sh
Update submodules in a git repository to the latest, but exclude one..
git submodule foreach '[ "$path" == "submodule-to-exclude" ] || git pull origin master'

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@tuus-amicus
tuus-amicus / m3u8.md
Last active December 16, 2020 08:49 — forked from primaryobjects/m3u8.md
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@tuus-amicus
tuus-amicus / gi
Created March 30, 2019 17:15 — forked from phha/gi
Interactively greate a gitignore file from gitignore.io
#!/bin/sh
# Create useful gitignore files
# Usage: gi [param]
# param is a comma separated list of ignore profiles.
# If param is ommited choose interactively.
function __gi() {
curl -L -s https://www.gitignore.io/api/"$@"
}