Skip to content

Instantly share code, notes, and snippets.

View siilver777's full-sized avatar

Jason Baracassa siilver777

  • Bankin'
  • Paris, France
View GitHub Profile
@siilver777
siilver777 / PlexCleaner.swift
Created February 22, 2021 11:40
Command-line Plex folder cleaner, removes SRT files that doesn't match an existing media
//
// main.swift
// PlexCleaner
//
// Created by Jason Pierna on 22/10/2020.
//
import Foundation
struct ValidationError: Error, CustomStringConvertible {
@siilver777
siilver777 / StretchyHeader.swift
Last active March 2, 2019 20:40
Make a stretchy & blurry collection header
class Layout: UICollectionViewFlowLayout {
// Recompute layout on scroll
override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
return true
}
// Update header size based on content offset (and keep it at the top)
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
let layoutAttributes = super.layoutAttributes(in: rect)
@siilver777
siilver777 / dl.sh
Created October 15, 2018 10:28
South Park Downloader (French voices)
#!/bin/bash/
# Variables and parameters
firstBaseUrl="http://south-park-tv.eu/videos"
secondBaseUrl="http://46.4.106.41"
startFromSeason=${1:-1}
endAtSeason=${2:-21}
baseFolder=$(pwd)