Skip to content

Instantly share code, notes, and snippets.

View Eonasdan's full-sized avatar

Eonasdan Eonasdan

View GitHub Profile
@Eonasdan
Eonasdan / azure-cognitive-search-index-schema.json
Created November 8, 2022 15:28
Azure Cognitive Search Index schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the index. An index name must only contain lowercase letters, digits or dashes, cannot start or end with dashes and is limited to 128 characters."
},
"description": {
"type": "string",
@Eonasdan
Eonasdan / renew_ssl_cert.yaml
Last active March 1, 2024 00:38 — forked from TJ-developer/renew_ssl_cert.yaml
Homeassistant Blueprint for SSL-Certificate renewal
blueprint:
name: Renew Let's Encrypt Certificate
description: Renew Certificate when due date is below given value
domain: automation
input:
cert_expiry_sensor:
name: Certificate Expiry Sensor
description: Sensor from the Certificate Expiry Integration (https://www.home-assistant.io/integrations/cert_expiry)
selector:
entity:
@Eonasdan
Eonasdan / ComparePlugin.ini
Last active September 28, 2023 13:59
Notepad++ Compare plugin dark mode colors
[Main]
Old is First=1
Old on Left=1
Default Compare is to Prev=1
Go to First Diff=0
Check Encodings=1
Wrap Around=0
Compact NavBar=1
Ignore Spaces=0
Detect Moves=1
@Eonasdan
Eonasdan / date-picker.component.html
Created August 22, 2022 13:51
Tempus Dominus Angular directives
<!--suppress XmlDuplicatedId, HtmlFormInputWithoutLabel -->
<app-field-wrapper
[label]="label"
[control]="control"
[controlName]="controlName"
>
<ng-container *ngIf="!readOnly">
<div
class="input-group date"
data-td-target-input="nearest"
@Eonasdan
Eonasdan / Model.cs
Last active September 30, 2022 12:37
MVC EditorFor Template for Datetimepicker
using System.ComponentModel.DataAnnotations;
[DataType(DataType.Time)]
public DateTime Updated { get; set; }
@Eonasdan
Eonasdan / JsRuntimeExtensions.cs
Last active July 14, 2022 01:00
Console log extensions for Blazor
public static class JsRuntimeExtensions
{
/// <summary>
/// Calls "console.log" on the client passing the args along with it.
/// </summary>
/// <example>
/// LogAsync("data") //same as console.log('data')
/// </example>
/// <example>
/// LogAsync("data", myData) //same as console.log('data', myData)
@Eonasdan
Eonasdan / A generic repository.md
Last active July 11, 2022 06:03
This is my attempt at a very flexible generic repository for an n-layer MVC project.

Generic Repo

This is my attempt at a very flexible generic repository for an n-layer MVC project.

IRepository

I've got this placed in my business/service layer which any DAL (Data Access Layer) project can reference and implement.

PagedEntities

@Eonasdan
Eonasdan / removeWin10Apps.ps1
Created September 4, 2015 14:58
Remove annoying windows 10 store apps you can't uninstall. this is a powershell script to for uninstall win 10 built in apps that run for no reason. It also appears that MS will force some/all of them back after a windows update. From http://www.howtogeek.com/224798/how-to-uninstall-windows-10s-built-in-apps-and-how-to-reinstall-them/
# Uninstall 3D Builder:
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
# Uninstall Alarms and Clock:
Get-AppxPackage *windowsalarms* | Remove-AppxPackage
# Uninstall Calculator:
Get-AppxPackage *windowscalculator* | Remove-AppxPackage
# Uninstall Calendar and Mail:
@Eonasdan
Eonasdan / default_browser.vbs
Created March 7, 2022 14:43
W10 change default browser to Chrome
Set WshShell = WScript.CreateObject("WScript.Shell")
' Open the default settings window
WshShell.Run "ms-settings:defaultapps"
WScript.Sleep 5000 ' Wait until open (adjust if necessary)
' Adjust number of tabs until you reach the browser choice setting
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
@Eonasdan
Eonasdan / readme.md
Last active March 3, 2022 20:55
Annoying clone/scrapper sites

What's this?

When doing a Google search, specially for code, I find a bunch of sites that just regurgitate StackOverflow or Github.

Add the following to your search to ignore these sites. I'll try to keep updating this when I find them.

-githubmemory.com -githubmate.com -githubhot.com