Skip to content

Instantly share code, notes, and snippets.

View cilerler's full-sized avatar
:octocat:

Cengiz Ilerler cilerler

:octocat:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cilerler on github.
  • I am cilerler (https://keybase.io/cilerler) on keybase.
  • I have a public key ASAly_hLH1FVQk7kT73AiWSR_w6Ue5Z7qdSasLKD84pjQQo

To claim this, I am signing this object:

@echo off
REM download latest nodejs & npm from https://nodejs.org/en/
REM or RUN command below in administrative mode
REM CALL npm-windows-upgrade
CALL npm uninstall -g @angular/cli
CALL npm uninstall -g generator-ngx-rocket
@echo off
ECHO -=[NODE]=-
CALL node -v
ECHO -=[NPM]=-
CALL npm -v
ECHO -=[YARN]=-
CALL yarn -v
public abstract class BaseEntity
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
//x [Required]
//x [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
//!++ Do not uncomment below https://github.com/OData/RESTier/issues/491
//x [Timestamp] //ROWVERSION
//x public byte[] UpdateVersion { get; set; }
@cilerler
cilerler / 189607_v1.sql
Last active October 30, 2017 20:07
Delete millions of rows from a SQL table https://dba.stackexchange.com/questions/189607
PRINT 'Drop temporary table if exist';
IF OBJECT_ID('tempdb..#MyTempTable') IS NOT NULL
BEGIN
DROP TABLE #MyTempTable;
END;
GO
CREATE TABLE #MyTempTable
(
Id BIGINT,
const _ = require('lodash');
const input = [{
"ActiveMembers": [{
"Id": 101,
"Name": "alpha"
}, {
"Id": 102,
"Name": "bravo"
}],
sequenceDiagram
    participant Service
    participant Provider

    loop Minute query
        Service->> Provider: request Records

        alt is maintenance
 Provider --x Service: response No-Record
@cilerler
cilerler / LoggerExtensionsHelper.cs
Last active November 17, 2016 12:50
Extended LogDebug and LogTrace with Conditional attribute
public static class LoggerExtensionsHelper
{
public const string Debug = "DEBUG";
public const string Trace = "TRACE";
/// <summary>Formats and writes a debug log message.</summary>
/// <param name="logger">The <see cref="T:Microsoft.Extensions.Logging.ILogger" /> to write to.</param>
/// <param name="eventId">The event id associated with the log.</param>
/// <param name="exception">The exception to log.</param>
/// <param name="message">Format string of the log message.</param>
@cilerler
cilerler / Generic.ts
Last active December 28, 2015 22:46
Dictionary<T>
module Generic {
"use strict";
export class KeyValuePair<T> {
private _key: string;
get Key(): string {
return this._key;
}
private IEnumerable<string> GetElementNames(XElement xElement, string path)
{
var output = new List<string>();
if (string.IsNullOrWhiteSpace(path))
{
path = xElement.Name.ToString();
output.Add(path);
if (xElement.HasAttributes)