Skip to content

Instantly share code, notes, and snippets.

View ngeri's full-sized avatar

Gergely Németh ngeri

View GitHub Profile
@krzysztofzablocki
krzysztofzablocki / process.sh
Created January 18, 2021 11:29
3rd party tooling processing script
#!/bin/zsh
cd "$(dirname "$0")/.."
if [[ -n "$CI" ]] || [[ $1 == "--fail-on-errors" ]] ; then
FAIL_ON_ERRORS=true
echo "Running in --fail-on-errors mode"
ERROR_START=""
COLOR_END=""
INFO_START=""
@a-sync
a-sync / radio1-downloader.bat
Last active May 31, 2023 20:25
radio1.hu tracklista URL alapján letölti az mp3 fájlokat
@echo off
title radio1-downloader @ https://gist.github.com/a-sync
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "[System.Net.ServicePointManager]::SecurityProtocol=[System.Net.SecurityProtocolType]::Tls12;[System.Net.WebRequest]::DefaultWebProxy.Credentials=[System.Net.CredentialCache]::DefaultCredentials;$Url=Read-Host -Prompt 'radio1.hu URL';$wc=New-Object System.Net.WebClient;$wc.Encoding=[System.Text.Encoding]::UTF8;$Links=$wc.DownloadString($Url.Trim())|Select-String -Pattern '<audio data-artist=\""(.*?)\"" data-title=\""(.*?)\"".*?>\n.*?<source src=\""(.*?)\"" type=\""audio/mp3\"">' -AllMatches;Foreach($i in $Links.Matches){$Name=\""$($i.Groups[1].Value) $($i.Groups[2].Value)\"".Split([IO.Path]::GetInvalidFileNameChars()) -join '_';Write-Host $Name;$wc.Headers.Add('Referer','https://www.radio1.hu');$wc.DownloadFile(\""https://www.radio1.hu$($i.Groups[3].Value)\"",\""$Name.mp3\"")}"
@steipete
steipete / FirebaseCoordinator.swift
Created April 13, 2020 13:38
If you're as confused as I am that there's an API for custom options, yet Google still requires a file named GoogleService-Info.plist in your app, here's some swizzling that fixes that for ya. All Swift :)
class FirebaseCoordinator {
static let shared = FirebaseCoordinator()
static let initialize: Void = {
/// We modify Google Firebase (and eventually Analytics) to load the mac-specific plist at runtime.
/// Google enforces that we have a file named "GoogleService-Info.plist" in the app resources.
/// This is unfortunate since we need two different files based on iOS and Mac version
/// One solution is a custom build step that copies in the correct file:
/// https://stackoverflow.com/questions/37615405/use-different-googleservice-info-plist-for-different-build-schemes
/// However, this is basically impossible since Catalyst doesn't set any custom build variables, so detection is extremely difficult.
/// We swizzle to modify the loading times.
//:
//: UserDefaultable.swift
//:
//: Created by Andyy Hope on 18/08/2016.
//: Twitter: @andyyhope
//: Medium: Andyy Hope, https://medium.com/@AndyyHope
import Foundation
// MARK: - Key Namespaceable