Skip to content

Instantly share code, notes, and snippets.

View ardacetinkaya's full-sized avatar
👨‍💻
Coding with ❤

Arda Cetinkaya ardacetinkaya

👨‍💻
Coding with ❤
View GitHub Profile
@ardacetinkaya
ardacetinkaya / .NET6Migration.md
Created October 4, 2021 14:28 — forked from davidfowl/.NET6Migration.md
.NET 6 ASP.NET Core Migration
private async Task<Func<SomeEntity, bool>> Filters(string query)
{
if (string.IsNullOrEmpty(query)) return null;
try
{
var conditions = query.Split(';', StringSplitOptions.RemoveEmptyEntries);
StringBuilder conditionTexts = new StringBuilder();
foreach (var item in conditions)
background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
@ardacetinkaya
ardacetinkaya / wpa_supplicant.conf
Created August 2, 2019 21:57
Raspberry Pi Zero wireless config file
country=TR
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="NETWORKNAME"
psk="NETWORKPASSWORD"
key_mgmt=WPA-PSK
}
@ardacetinkaya
ardacetinkaya / orders.js
Last active July 31, 2019 08:46
Yemeksepeti'nde verilen toplam sipariş miktarı(TL) ve adeti olarak düzenlendi. İlk kaynak: https://eksisozluk.com/toplam-yemeksepeti-com-harcamasini-gosteren-kod--6125159?p=1
let changed = true;
let itemLength = 0;
let oldLength = 0;
let tolerance = 0;
var totalP = 0;
var sleepTime = 1500;
var repository = new Map();
function calculate() {
var totalAmount=0;
@ardacetinkaya
ardacetinkaya / BST.cs
Created July 16, 2019 09:48
Simple Binary Search Tree
namespace BinarySearchTree
{
public class Node
{
public int Value { get; set; }
public Node Left { get; set; }
public Node Right { get; set; }
}
@ardacetinkaya
ardacetinkaya / Pagination.Example
Last active April 2, 2019 06:45
Pagination Example
public class ExampleData
{
public string Name { get; set; }
public int Age { get; set; }
/// <summary>
/// Total count of the records
/// </summary>
internal int TotalCount { get; set; }
}
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
var key = Encoding.ASCII.GetBytes(Configuration["Application:Secret"]);
services.AddAuthentication(x =>
{
x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
x.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
})
@ardacetinkaya
ardacetinkaya / NET_Core_API_Reference_v21.json
Last active September 8, 2018 10:45
API references of .NET Framework 4.7.2 and .NET Core 2.1. Please always check .NET API Browser for latest updates. (https://docs.microsoft.com/en-us/dotnet/api/)
{
"apiItems":[
{
"displayName":"Microsoft.CSharp.RuntimeBinder",
"url":"https://docs.microsoft.com/dotnet/api/microsoft.csharp.runtimebinder",
"description":"The namespace provides classes and interfaces that support interoperation between Dynamic Language Runtime and C#."
},
{
"displayName":"Microsoft.VisualBasic",
"url":"https://docs.microsoft.com/dotnet/api/microsoft.visualbasic",
@ardacetinkaya
ardacetinkaya / StoredProcedure_Table_Relation.sql
Last active April 28, 2019 22:52
Simple SQL to find tables that are used in a stored procedure. #mssql #sql #sqlserver #storedprocedure
DECLARE @temptableforSP TABLE (spName varchar(100), tableName nvarchar(100))
DECLARE @SP_Name as NVARCHAR(100);
DECLARE @SP_Cursor as CURSOR;
SET @SP_Cursor = CURSOR FOR
SELECT [name] FROM sys.objects WHERE name LIKE 'sp%' AND type='P' -- Gets SPs for specific names
OPEN @SP_Cursor;
FETCH NEXT FROM @SP_Cursor INTO @SP_Name;
WHILE @@FETCH_STATUS = 0