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 / twoSum.js
Last active September 25, 2021 08:34
Two Sums
// https://leetcode.com/problems/two-sum/
/**
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
var twoSum = function(nums, target) {
/* First Solution (Brute Force)
let indexes = [];
1. Ne yapmaya çalışıyordum?
Yapmaya çalıştığınız şeyi yazın. Örneğin "Yeni kişi eklemek istiyordum."
2. Ne olması gerekiyordu?
Yapmaya çalıştığınız şeyin sonunda olması gereken şeyi yazın. Örneğin: "Uygulama yeni eklenen kişinin sayfasına gitmeliydi."
3. Ne oldu?
@midorikocak
midorikocak / index.html
Created May 14, 2020 18:33
Html Egitimi Ornegi
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Midori Kocak</title>
</head>
<body>
<div id="hakkimda">
<h1>Midori Kocak</h1>
@midorikocak
midorikocak / index.html
Created April 2, 2020 16:03
Simple Responsive Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Midori Kocak</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body class="vertical">
<header class="horizontal">
<h1>Midori Kocak</h1>
@midorikocak
midorikocak / manifesto.md
Last active February 20, 2020 02:18
You are hiring HUMANS!

You are hiring HUMANS!

  • Read our resume from the beginning to end.
  • Do not make us fill endless forms.
  • Be polite, you don't need some human ASAP.
  • If you are not going to hire 100%, do not invite to interview. It's should not be a trial game.
  • Respond to the applicant as soon as possible, not later than 2 weeks.
  • Give an honest, proper and constructive feedback stating why you are not hiring that person.
  • No whiteboard interviews, stress testing, drills, brain teasers
  • If you want to see how a person codes, give them a home task similar to what you expect.
@midorikocak
midorikocak / reddit-php.md
Created February 4, 2020 09:36
Why I left reddit.com/r/PHP? Because it's toxic.

Why I left reddit.com/r/PHP? Because it's toxic.

Hello.

It's better for me to leave this place because it's no different than an abusive workplace. Most of the people do not know what they are talking about and they can confuse things like implementing arrayaccess interface with implementing toArray method. Note: my pronouns ar she/her.

I am a computer scientist graduated 10 years ago, right now studying Masters of Visual Graphic design, because I was let go from my job with some bonus after half year of mobbing and harrassment. The girl who was moved in my position resigned after 3 months. So I am not paid other than freelance work. But when I am paid, it's not underpaid.

Packages:

<?php
$class = (new class{
public function __toArray(){
echo "casted\n";
return
[
'key'=>'value'
];
}
@midorikocak
midorikocak / hello_world.phy
Created February 1, 2020 18:40
World's first phy language code.
BEGIN
"Hello world"
DIE
@midorikocak
midorikocak / CrudInterface.php
Created January 27, 2020 08:22
Interface for a CRUD app.
<?php
declare(strict_types=1);
namespace midorikocak\nano;
use Exception;
interface CrudInterface
{
@midorikocak
midorikocak / api.php
Created January 15, 2020 14:47
URI Wildcard Matching
<?php
declare(strict_types=1);
/*
* Test if pattern is like users/{id}/comments/{comment_id}
* and create variables if url is satisfies pattern
*
* example:
* pattern: users/{id}/comments/{comment_id}
* uri: /users/4/comments/5