Skip to content

Instantly share code, notes, and snippets.

@HonbraDev
HonbraDev / remove.sh
Last active June 17, 2024 21:09
Ubuntu Server 20.04 LTS Firefox kiosk
# Stop the kiosk service
sudo systemctl stop kiosk
# Remove the kiosk service from startup
sudo systemctl disable kiosk
# Remove the kiosk service
sudo rm -f /etc/systemd/system/kiosk.service
# Reload systemctl daemons
#pragma warning disable MA0048 // File name must match type name
#define INTERNAL_NULLABLE_ATTRIBUTES
#if NETSTANDARD2_0 || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NET45 || NET451 || NET452 || NET46 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48
// https://github.com/dotnet/corefx/blob/48363ac826ccf66fbe31a5dcb1dc2aab9a7dd768/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
@tygor
tygor / Deploy-SquirrelApp.ps1
Last active June 10, 2020 22:19
Squirrel.Windows Powershell Releasify script
<#
.Synopsis
Packs and deploys a Squirrel.Windows app
.DESCRIPTION
Nuget Pack and Squirrel.Windows Releasify. The parameters taken will then run the --signWithParams flag which signs your executables with the given certificate.
.EXAMPLE
Deploy-SquirrelApp -NuSpec C:\Temp\MyApp.nuspec -OutputDir .\bin\Release\ -ReleaseDir C:\Network\Folder\ -CertificatePath .\Certificate.pfx
#>
function Deploy-SquirrelApp {
[CmdletBinding()]
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active July 24, 2024 17:42
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@dknoodle
dknoodle / Windows Defender Exclusions VS 2017.ps1
Last active April 13, 2024 18:55
Adds Windows Defender exclusions for Visual Studio 2017
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null
@thomaslevesque
thomaslevesque / CSharpErrorsAndWarnings.md
Last active June 18, 2024 07:18
All C# errors and warnings. NOTE: this list is out of date. See https://github.com/thomaslevesque/GenerateCSharpErrors/blob/master/CSharpErrorsAndWarnings.md for a more recent version

All C# errors and warnings

Parsed from the Roslyn source code using Roslyn.

Code Severity Message
CS0006 Error Metadata file '{0}' could not be found
CS0009 Fatal Metadata file '{0}' could not be opened -- {1}
CS0012 Error The type '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'.
CS0016 Error Could not write to output file '{0}' -- '{1}'
@nmec
nmec / gulp-modernizr.js
Last active January 31, 2019 17:15
A very simple gulp task for compiling a custom modernizr build.
'use strict';
var fs = require('fs');
var gulp = require( 'gulp' );
var modernizr = require('modernizr');
var config = require('./modernizr-config'); // path to JSON config
gulp.task( 'modernizr', function (done) {
modernizr.build(config, function(code) {
function Update-AssemblyInfoVersionFiles
{
Param
(
[Parameter(Mandatory=$true)]
[string]$productVersion
)
$buildNumber = $env:BUILD_BUILDNUMBER
if ($buildNumber -eq $null)
@a-h
a-h / program.cs
Created October 17, 2014 09:02
Handle merge conflicts in NuGet packages.config files
using System.Xml.Serialization;
using System.IO;
public static class Program
{
void Main()
{
AcceptLatestPackages(@"C:\projects\MergeMigrations_AddTableB\");
}
@esfand
esfand / typescript_angular.adoc
Last active September 30, 2022 12:37
AngularJS with TypeScript