This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Make sure the Microsoft App Installer is installed: | |
# https://www.microsoft.com/en-us/p/app-installer/9nblggh4nns1 | |
# 2. Edit the list of apps to install. | |
# 3. Run this script as administrator. | |
Write-Output "Installing Apps" | |
$apps = @( | |
@{name = "7zip.7zip" }, | |
@{name = "Adobe.Acrobat.Reader.64-bit" }, | |
@{name = "Axosoft.GitKraken" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Get Catholic easter for requested year | |
/// </summary> | |
/// <param name="year">Year of easter</param> | |
/// <returns>DateTime of Catholic Easter</returns> | |
public static DateTime GetCatholicEaster(int year) | |
{ | |
var month = 3; | |
var a = year % 19 + 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Greek Tax Registration Number Validation (AFM) | |
// Αλγόριθμος ορθότητας ΑΦΜ | |
function validateAFM(afm) { | |
if (!afm.match(/^\d{9}$/) || afm == '000000000') | |
return false; | |
var m = 1, sum = 0; | |
for (var i = 7; i >= 0; i--) { | |
m *= 2; | |
sum += afm.charAt(i) * m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data.SqlTypes; | |
using System.IO; | |
using System.Text; | |
using Microsoft.SqlServer.Server; | |
[Serializable] | |
[SqlUserDefinedAggregate( | |
Format.UserDefined, | |
IsInvariantToNulls = true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Greek Social Security Number Validation (AMKA) | |
// Αλγόριθμος ορθότητας ΑΜΚΑ | |
function validateAMKA(amka) { | |
if (!amka.match(/^\d{11}$/) || amka == '00000000000') | |
return false; | |
var iSum = 0; | |
for (var i = 1; i <= amka.length; i++) { | |
var iDigit = parseInt(amka.charAt(i - 1), 10); | |
if (i % 2 === 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Databases Info | |
*/ | |
WITH fs | |
AS | |
( | |
SELECT database_id, TYPE, SIZE * 8.0 / 1024 SIZE | |
FROM sys.master_files | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Identity; | |
public class GreekIdentityErrorDescriber : IdentityErrorDescriber | |
{ | |
public override IdentityError DefaultError() { return new IdentityError { Code = nameof(DefaultError), Description = $"Προέκυψε άγνωστο σφάλμα." }; } | |
public override IdentityError ConcurrencyFailure() { return new IdentityError { Code = nameof(ConcurrencyFailure), Description = "Παρουσιάστηκε σφάλμα συγχρονισμού, το αντικείμενο έχει ήδη τροποποιηθεί (Optimistic concurrency failure)." }; } | |
public override IdentityError PasswordMismatch() { return new IdentityError { Code = nameof(PasswordMismatch), Description = "Λάθος κωδικός πρόσβασης." }; } | |
public override IdentityError InvalidToken() { return new IdentityError { Code = nameof(InvalidToken), Description = "Λάθος token." }; } | |
public override IdentityError LoginAlreadyAssociated() { return new IdentityError { Code = nameof(LoginAlreadyAssociated), Description = "Υπάρχει ήδη χρήστης με αυτό το όνομα" }; } | |
public override IdentityErr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
File name: Waher-style.xml | |
Style Name: Waher-style | |
Description: Custom style for Notepad++ | |
Inspired by the Jani Kesanen modification of and the original Zenburn colorscheme for Vim by Jani Nurminen. | |
Supported languages: PHP,MySQL,Javascript,XML,HTML,CSS,INI | |
Created by: Kristo Vaher (kristo@waher.net) | |
Released: 04.05.2010 | |
License: GNU Free License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('datepickerLocaldate', ['$parse', function ($parse) { | |
var directive = { | |
restrict: 'A', | |
require: ['ngModel'], | |
link: link | |
}; | |
return directive; | |
function link(scope, element, attr, ctrls) { | |
var ngModelController = ctrls[0]; |
NewerOlder