Skip to content

Instantly share code, notes, and snippets.

View midorikocak's full-sized avatar
😎
cool

Midori Kocak midorikocak

😎
cool
  • Prague
View GitHub Profile
@midorikocak
midorikocak / User.php
Last active January 13, 2020 22:20
Vanilla PHP example
<?php
declare(strict_types=1);
namespace MidoriKocak;
use function array_key_exists;
class User
{
@midorikocak
midorikocak / stairs.pdi
Created December 19, 2019 12:58
Processing Example
String words[];
void setup() {
words = loadStrings("speech.txt");
size(640, 360);
background(255);
fill(0);
background(255);
float indent = 0;
@midorikocak
midorikocak / README.md
Last active September 3, 2019 15:54
Standard README.md example

Proje adı (Today yazacaksın)

Açıklamayı buraya yaz.

Installation

TL;DR command list

git clone git@github.com:midorikocak/today

cd today

@midorikocak
midorikocak / aslihan.c
Created August 24, 2019 13:45
Binary Search
#include <stdio.h>
#include <stdlib.h>
int eb=9;
int ek=0;
int aranan = 120;
int deneme=1;
int bakilan = 0;
int dizi[10]={10,19,28,41,59,67,75,80,86,94};
void logla(ek,eb,aranan,bakilan,deneme)
@midorikocak
midorikocak / binary-search.js
Created August 24, 2019 11:54
Simple Binary Search Example
function binarySearch(aranan, dizi) {
var ek = 0;
var eb = 9;
var bakilan = Math.floor((ek + eb) / 2);
var deneme = 1;
while (ek <= eb) {
logla(ek, eb, aranan, bakilan, deneme);
if (aranan == dizi[bakilan]) {
console.log("sayi bulundu");
@midorikocak
midorikocak / resume.json
Last active July 31, 2019 13:07
Midori Kocak Resume
{
"basics": {
"name": "Mutlu Koçak",
"label": "Software Engineer",
"email": "mtkocak@gmail.com",
"phone": "+42(077) 525-9871",
"location": {
"address": "Parizska 5, Praha 1 \n110 00\nPrague\nCzech Republic",
"region": "Prague"
},
function myFunction() {
var str = "http://www.wikipedia.org/default.html?ct=32&op=92&item=98";
var patt = /[?&](?<key>[^&]*)=(?<value>[^&]*)/giu;
let result = str.match(patt);
let extra = result.map(item=>item.match(/([^&?=]+)/g))
var object = extra.reduce(function(o, val) { o[val[0]] = val[1]; return o; }, {});
console.log(object)
}
// with simple string methods
@midorikocak
midorikocak / resume.yaml
Created August 18, 2018 07:15
Yaml formatted Json resume
---
basics:
name: John Doe
label: Programmer
picture: ''
email: john@gmail.com
phone: "(912) 555-4321"
website: http://johndoe.com
summary: A summary of John Doe...
location:
@midorikocak
midorikocak / index.js
Created November 26, 2017 14:59
A bunch of Firebase Data Deflatter and Graph Creator functions
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
exports.graph = functions.https.onRequest((request, response) => {
var db = admin.database();
var ref = db.ref();
var nodeMap = {};
@midorikocak
midorikocak / amazon2.java
Created November 17, 2017 10:42
Amazon Practice 2
// IMPORT LIBRARY PACKAGES NEEDED BY YOUR PROGRAM
// SOME CLASSES WITHIN A PACKAGE MAY BE RESTRICTED
// DEFINE ANY CLASS AND METHOD NEEDED
// CLASS BEGINS, THIS CLASS IS REQUIRED
import java.util.*;
class GCD
{
// METHOD SIGNATURE BEGINS, THIS METHOD IS REQUIRED
public int generalizedGCD(int num, int[] arr)
{