Skip to content

Instantly share code, notes, and snippets.

View ozansulukpinar's full-sized avatar

Ozan Sülükpınar ozansulukpinar

View GitHub Profile
[
{
"name": "Dağılcak Tabiat Parkı",
"city": "Adana",
"size": "2.6"
},
{
"name": "Karataş Tabiat Parkı",
"city": "Adana",
"size": "29.8"
@ozansulukpinar
ozansulukpinar / queries.sql
Last active February 20, 2023 00:59
Fundamental SQL Queries
/***************************************************************************
* ozansulukpinar *
* *
* Writing Basic SQL Queries *
* Thurs Feb 25 23:50:00 2021 *
***************************************************************************/
-- =========================================================================
-- Select all of the columns in a table using the *
-- =========================================================================
[
{
"id":"1",
"name":"New Year's Day",
"date":"January 1",
},
{
"id":"2",
"name":"National Sovereignty and Children's Day",
"date":"April 23",
@ozansulukpinar
ozansulukpinar / validator.js
Last active May 9, 2021 15:58
Validation of Turkish Identification Number
/*
** Properties of Turkish Identification Number
* Every Turkish citizen has unique one of it.
* It must consist of eleven digits.
* Last digit must be even.
* First digit cannot be zero.
* The sum of first, third, fifth, seventh and
nineth digits is multiplied by seven. The sum
of second, fourth, sixth and eighth digits is
substracted from it. When that number is
@ozansulukpinar
ozansulukpinar / Program.cs
Created May 9, 2021 15:55
Ping an IP address
using System.Net.NetworkInformation;
public class Program
{
public static void Main()
{
Ping ping = new Ping();
PingReply reply = ping.Send(IPAddress,1000);
string status = reply.Status.ToString();
Console.WriteLine(status);
@ozansulukpinar
ozansulukpinar / converter.js
Created May 9, 2021 16:00
Roman Numerals Converter
//This script converts Roman numerals to decimal between I(1) to MMMCMXCIX(3999)
var numeral = "romanNumeral";
convertFromRoman(numeral);
function convertFromRoman(numeral) {
var numbers = [];
var previousNumber, currentNumber, sum, equalityTime, repeatedTimeOfV, repeatedTimeOfL, repeatedTimeOfD;
sum = repeatedTimeOfV = repeatedTimeOfL = repeatedTimeOfD = 0;
@ozansulukpinar
ozansulukpinar / DynamicLinksGateway.cs
Created May 13, 2021 20:44
Create a dynamic link by using Firebase console
using Newtonsoft.Json.Linq;
using System.IO;
using System.Net;
namespace SampleProject.Core.Business.Gateway
{
public class DynamicLinksGateway
{
public string ShortLink(string longUrl)
{
@ozansulukpinar
ozansulukpinar / base64.cs
Created May 19, 2021 21:11
Get the image from URL to convert to base64
using System.Net;
private string GetBase64StringForImage(string url)
{
string base64string = "";
if (url != null)
{
try
{
@ozansulukpinar
ozansulukpinar / week0.md
Last active November 14, 2021 12:08
My notes for Harvard's CS50

Lecture 0 - Scratch

What is computer science - problem solving

input-output

Ten digits - Human
0 1 2 3 4 5 6 7 8 9

Two digits - Computer

[
{
"id": 1,
"name": "Adalar",
"population": "16.033",
"area": 11
},
{
"id": 2,
"name": "Arnavutkoy",