Skip to content

Instantly share code, notes, and snippets.

View serkanince's full-sized avatar
:octocat:
Focusing

Serkan serkanince

:octocat:
Focusing
View GitHub Profile
@serkanince
serkanince / turkey-cities.sql
Last active March 16, 2023 08:16
Sql for Turkey Cities (lat//long information included)
/* Sql for Turkey Cities (lat long information included) */
/* https://gist.github.com/serkanince/ */
CREATE TABLE sehirler (
id INT NOT NULL,
adi VARCHAR(50) NOT NULL,
lat DECIMAL(10, 4) NOT NULL,
long DECIMAL(10, 4) NOT NULL,
PRIMARY KEY (id)
@serkanince
serkanince / IRepository.cs
Last active October 14, 2019 11:42
Repository Pattern
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Sample.Repository
{
public interface IRepository<T>
{
@serkanince
serkanince / SehirRepository.cs
Created October 11, 2019 14:33
Repository-Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Sample.Repository
{
public class SehirRepository
{
@serkanince
serkanince / Startup.cs
Created October 9, 2019 07:38
ef code-first sql connection
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@serkanince
serkanince / AzureDBContext.cs
Created October 9, 2019 07:33
ef code-first
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
namespace Sample
{
public sealed class AzureDBContext : DbContext
{
public AzureDBContext(DbContextOptions<AzureDBContext> options) : base(options)
@serkanince
serkanince / App.js
Created February 22, 2019 08:00
React-Native Navigation Simple Ex
import React, { Component } from 'react'
import { AppRegistry, View, Image,StyleSheet,TextInput,FlatList,ActivityIndicator ,SectionList,Text} from 'react-native'
import { StackViewStyleInterpolator } from 'react-navigation-stack';
import { Scene, Router, Actions, Reducer, ActionConst, Overlay, Tabs, Modal, Drawer, Stack, Lightbox } from 'react-native-router-flux';
import PageOne from './PageOne';
import PageTwo from './PageTwo';
export default class App extends Component {
@serkanince
serkanince / stringtobyte.cs
Created June 29, 2018 14:27
byte string (hexa string) to byte[] convert
var result = Enumerable.Range(0, str.Length / 2).Select(x => Convert.ToByte(str.Substring(x * 2, 2), 16)).ToArray();
@serkanince
serkanince / Program.cs
Last active October 26, 2016 12:23
SecureString Sample
using System;
using System.Security;
namespace Sample07_SecureString
{
class Program
{
static void Main(string[] args)
{
SecureString secString = new SecureString();
@serkanince
serkanince / HomeController.cs
Created October 13, 2016 07:41
tincymce install & image plugin
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Sample05_TincymceSample.Controllers
{
public class HomeController : Controller
{
@serkanince
serkanince / program.cs
Last active May 30, 2016 07:48
Wcf Ping App
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
namespace Sample02_Wcf_Check_App
{
class Program