Skip to content

Instantly share code, notes, and snippets.

View shashank-shekhar's full-sized avatar
👋

Shashank Shekhar shashank-shekhar

👋
View GitHub Profile
@SteveL-MSFT
SteveL-MSFT / profile.ps1
Last active May 27, 2024 14:02
PowerShell Prompt
#Requires -Version 7
# Version 1.2.13
# check if newer version
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e"
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
if ([System.IO.File]::Exists($latestVersionFile)) {
@LynoDesu
LynoDesu / AndroidHelpers.cs
Created June 20, 2018 19:04
Disable ShiftMode in Xamarin.Forms Android BottomNavigationView
using System;
using Android.Support.Design.Internal;
using Android.Support.Design.Widget;
namespace MyProject.App.Droid.Helpers
{
public static class AndroidHelpers
{
public static void SetShiftMode(this BottomNavigationView bottomNavigationView, bool enableShiftMode, bool enableItemShiftMode)
{
@cmendible
cmendible / Roslyn.CodeGeneration.Program.cs
Created August 16, 2017 09:30
Create a class with dotnet core and roslyn with using statements outside the namespace
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn.CodeGeneration
{
public class Program
{
public static void Main(string[] args)
@mscottreed
mscottreed / DelegateCommand.cs
Created June 24, 2015 11:20
DelegateCommand
public class DelegateCommand<T> : ICommand
{
readonly Func<T, bool> canExecute = _ => true;
readonly Action<T> executeAction;
bool canExecuteCache;
public DelegateCommand(Action<T> executeAction, Func<T, bool> canExecute)
{
this.executeAction = executeAction;
@evanscottgray
evanscottgray / docker_kill.sh
Last active November 7, 2023 03:40
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt