Skip to content

Instantly share code, notes, and snippets.

View haythamnikolaidis's full-sized avatar

Ivan Kruger haythamnikolaidis

View GitHub Profile
@haythamnikolaidis
haythamnikolaidis / git_init_workshop.ps1
Created April 17, 2026 07:44
Initialise a git repo for a workshop
# --- CONFIG ---
$RepoName = "git-pun-workshop"
New-Item -ItemType Directory -Name $RepoName | Out-Null
Set-Location $RepoName
# Initialize the repo
git init -b main
# 1. INITIAL COMMIT
Set-Content README.md "# The Pun-derful Git Workshop"
@haythamnikolaidis
haythamnikolaidis / git_init_workshop.sh
Last active April 24, 2026 09:11
bash script to initialise a git repo for a workshop.
#!/bin/bash
# --- CONFIG ---
REPO_NAME="git-pun-workshop"
mkdir $REPO_NAME
cd $REPO_NAME
# Initialize the repo
git init -b main
@haythamnikolaidis
haythamnikolaidis / progress.html
Last active August 18, 2025 12:37
CSS-only progress bar. No JavaScript needed. Dynamically updates using data attributes.
<html>
<head>
<meta charset="utf-8">
<title>Javascript-less Progress bar</title>
<style type="text/css" media="all">
.progress-bar{
background-color: #c0c0c0;
width: 100%;
height: 2rem;
@haythamnikolaidis
haythamnikolaidis / nukebin.sh
Created August 26, 2021 09:41
Every now and then, during Xamarin Mobile app development one needs to clean out, bin and obj folders, the packages folder or the local nuget cache. This is a ZSH script to do that.
# Add this to the end of your ~/.zshrc file and run
# source ~/.zshrc
# then you can use 'nukebin' or 'nukebin -pack' in any of your Xamarin/.Net projects.
nukebin(){
find . -iname "bin" -o -iname "obj" | xargs rm -rfv
if [ "$1" = "-pack" ]
then
find . -iname "packages" | xargs rm -rfv
@haythamnikolaidis
haythamnikolaidis / androidVersionNumberUpdate.ps1
Last active April 29, 2020 15:54
Powershell Script to Update Android Version Code during VSTS Build
$ManifestFile = Get-ChildItem -Path $Env:BUILD_SOURCESDIRECTORY -Filter AndroidManifest.xml -Recurse
$fileXml = [xml] (Get-Content $ManifestFile.FullName )
$xpath = "//manifest"
Select-Xml -xml $fileXml -XPath $xpath | %{
$_.Node.SetAttribute("android:versionName", "1.0.0.$Env:BUILD_BUILDNUMBER")
$_.Node.SetAttribute("android:versionCode", $Env:BUILD_BUILDNUMBER)
}
$fileXml.Save($ManifestFile)
Get-Content $ManifestFile