Skip to content

Instantly share code, notes, and snippets.

View oli-g-sk's full-sized avatar
🏠
Working from home

Oliver oli-g-sk

🏠
Working from home
View GitHub Profile
@oli-g-sk
oli-g-sk / dotnet-pack-nuget-org.yml
Last active July 19, 2026 23:38
YML to publish a .NET class library to NuGet.org
name: Publish Library to NuGet.org
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
@oli-g-sk
oli-g-sk / dotnet-pack-gh-packages.yml
Last active July 19, 2026 23:35
YML to publish a .NET class library to GitHub Packages
name: Publish Library to GitHub Packages
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
@oli-g-sk
oli-g-sk / dotnet-delete-bin-obj.ps1
Last active April 7, 2021 19:05
PowerShell script to delete .NET 'bin' and 'obj' folders
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
@oli-g-sk
oli-g-sk / android-util-drawable-gettinted.java
Last active April 7, 2021 19:05
Load and tint a Drawable, with vector support on older API levels
public static class Util {
public Drawable getTintedDrawable(Context context, @DrawableRes int id, @ColorRes int colorId) {
// use AppCompatResources to get Drawable for pre-Lollipop vector compatibility;
Drawable drawable = AppCompatResources.getDrawable(context, id);
if (drawable == null) {
return null;
}