Skip to content

Instantly share code, notes, and snippets.

View gigi81's full-sized avatar

Luigi Grilli gigi81

View GitHub Profile
#!/bin/sh
# vscode
# https://code.visualstudio.com/docs/setup/linux#_rhel-fedora-and-centos-based-distributions
rpm --import https://packages.microsoft.com/keys/microsoft.asc
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
dnf check-update
dnf -y install code
@gigi81
gigi81 / winget
Last active June 10, 2023 14:57
winget install -e notepad++
winget install -e alcpu.CoreTemp
winget install -e 7zip.7zip
winget install -e Adobe.AdobeAcrobatReaderDC
winget install --silent -e Git.Git
winget install --silent -e Fork.Fork
winget install --silent -e TortoiseGit.TortoiseGit
winget install --silent -e Python.Python.3
winget install --silent -e Microsoft.VisualStudioCode
winget install --silent -e VideoLAN.VLC
Purpose Package Name(s)
Dependency Injection Microsoft.Extensions.DependencyInjection.Abstractions
Microsoft.Extensions.DependencyInjection
Autofac
Actor Model/System Akka
Service/Console App Scaffolding Topshelf
Microsoft.Extensions.Hosting
Logging Microsoft.Extensions.Logging.Abstractions
Microsoft.Extensions.Logging
log4net
Metrics
Database
Processes SimpleExec
#missing
#davinci resolve
#visual studio
#photo editor
#affinity photo
#affinity designer
#drivers
choco install amd-ryzen-chipset
Get-Process -Name WmiPrvSE | Stop-Process -Force
$PullServer = "localhost:8050"
$ConfigurationId = "45268a6b-9f2d-49eb-a328-79920b389e7a"
#region Generate report
function Get-DscStatusReport
{
param(
$ServiceURL,
$ConfigurationId = "$((glcm).ConfigurationId)"
)
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
namespace RestartManager
{
public sealed class RestartManagerSession : IDisposable
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
namespace RestartManager
{
public sealed class RestartManagerSession : IDisposable
{
<Target Name="Deploy" AfterTargets="Build">
<MSBuild
Projects="$(ProjectPath)"
Targets="WebPublish"
Properties="PublishProfile=LocalDeploy"
/>
</Target>
@gigi81
gigi81 / BinPath.cs
Created December 3, 2012 15:32
Asp.Net get bin path
public static string BinFilesPath
{
get
{
string dllPath;
dllPath = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
dllPath = new Uri(dllPath).LocalPath;
dllPath = System.IO.Path.GetDirectoryName(dllPath);