Skip to content

Instantly share code, notes, and snippets.

Midori Koçak midorikocak

Block or report user

Report or block midorikocak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@midorikocak
midorikocak / resume.json
Last active Jul 31, 2019
Midori Kocak Resume
View resume.json
{
"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"
},
View getquery.js
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 Aug 18, 2018
Yaml formatted Json resume
View resume.yaml
---
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 Nov 26, 2017
A bunch of Firebase Data Deflatter and Graph Creator functions
View index.js
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 Nov 17, 2017
Amazon Practice 2
View amazon2.java
// 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)
{
@midorikocak
midorikocak / amazon1.java
Created Nov 17, 2017
Amazon Practice 1
View amazon1.java
// IMPORT LIBRARY PACKAGES NEEDED BY YOUR PROGRAM
import java.util.*;
import java.util.Arrays;
import java.util.List;
// SOME CLASSES WITHIN A PACKAGE MAY BE RESTRICTED
// DEFINE ANY CLASS AND METHOD NEEDED
// CLASS BEGINS, THIS CLASS IS REQUIRED
public class Solution
{
// METHOD SIGNATURE BEGINS, THIS METHOD IS REQUIRED
@midorikocak
midorikocak / colors.css
Created Nov 10, 2017
CakePHP 3 Color Override CSS
View colors.css
a:hover {
color: #747474;
}
a {
color: #747474;
}
.side-nav li a:not(.button) {
color: #747474;
View mindbreaker.php
<?php
private function countRatings(string $placeId, $categories): array
{
$params = [':place_id' => $placeId];
$in_params = [];
$in = "";
foreach ($categories as $i => $item) {
$key = ":category" . $i;
$in .= "$key,";
@midorikocak
midorikocak / findmax.php
Last active Jul 11, 2017
find Max on a PHP Tree
View findmax.php
<?php
function createRangeArray(int $max)
{
if ($max < 0 || $max > PHP_INT_MAX) {
throw new InvalidArgumentException('You bastard!');
}
$result = [];
@midorikocak
midorikocak / tail.php
Created Jun 20, 2017
Google Interview Question (Implement unix tail using file API)
View tail.php
<?php
function tail($filename, $numberOfLines){
$counter = 0;
$handler = fopen($filename, 'r');
$end = filesize($filename);
$start = -1;
$current = $start;
You can’t perform that action at this time.