Skip to content

Instantly share code, notes, and snippets.

Avatar

Ermir Beqiraj ermirbeqiraj

View GitHub Profile
View AccountController.cs
//
// Controller placed in mvc client project
//
public class AccountController : Controller
{
[Authorize(Roles = "support")]
public IActionResult Impersonate(Guid id)
{
if (id == Guid.Empty)
return BadRequest();
View EnumHelper.cs
public static class EnumHelper
{
public static string Description(this Enum value)
{
FieldInfo fi = value.GetType().GetField(value.ToString());
DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
return attributes.Length > 0 ? attributes[0].Description : value.ToString();
}
public static List<EnumDrop<T>> EnumerateDrop<T>() where T : Enum
@ermirbeqiraj
ermirbeqiraj / clean-up-boot-partition-ubuntu.md
Created Mar 25, 2019 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64
View clean-up-boot-partition-ubuntu.md

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r