Skip to content

Instantly share code, notes, and snippets.

View dorukcan's full-sized avatar

Dorukcan Kişin dorukcan

View GitHub Profile
@ismailbaskin
ismailbaskin / il_ilce_enlem_boylam.sql
Created April 25, 2012 18:50
Türkiye İl ve İlçelerin enlem boylam bilgileri
/*
Türkiye İl ve İlçelerin enlem boylam bilgileri (dörtgen olarak sınır pozisyonlarıyla birlikte) kaynak : google maps (başarsoft)
twitter : http://twitter.com/tserpico
*/
DROP TABLE IF EXISTS `pk_il`;
CREATE TABLE `pk_il` (
`il_id` int(2) NOT NULL COMMENT 'plaka kodu',
`il_adi` varchar(255) NOT NULL,
`lat` double(20,8) DEFAULT NULL COMMENT 'enlem',
@halilim
halilim / bozuk_turkce_karakter_duzelt.php
Created September 1, 2013 18:32
Bozuk Türkçe karakter düzelt - Fix corrupt Turkish characters
<?php
function array_make_first(&$array, $element) {
if (($ndx = array_search($element, $array)) !== false) {
unset($array[$ndx]);
array_unshift($array, $element);
}
}
$encler = mb_list_encodings();
@DanSearle
DanSearle / gist:6807933
Created October 3, 2013 10:49
Download a web page and all linked content, rewriting any links for offline viewing.
wget --mirror -p --convert-links -P <destdir> <URL>
@dkavraal
dkavraal / türkçe.py
Last active January 3, 2020 07:46
in Turkish texts detecting which charset among cp1254 (windows 1254) and UTF-8 is used
"""
Letter Codes
------------------------
LETTER Windows-1254 ISO-8859-9 latin5 UTF-8
ğ b'\xf0' b'\xf0' b'\xf0' b'\xc4\x9f'
ı b'\xfd' b'\xfd' b'\xfd' b'\xc4\xb1'
ş b'\xfe' b'\xfe' b'\xfe' b'\xc5\x9f'
ü b'\xfc' b'\xfc' b'\xfc' b'\xc3\xbc'
ö b'\xf6' b'\xf6' b'\xf6' b'\xc3\xb6'
@gtallen1187
gtallen1187 / scar_tissue.md
Created November 1, 2015 23:53
talk given by John Ousterhout about sustaining relationships

"Scar Tissues Make Relationships Wear Out"

04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.

This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.

[Laughter]

> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation

@joepie91
joepie91 / vpn.md
Last active April 17, 2024 18:05
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@wojteklu
wojteklu / clean_code.md
Last active April 18, 2024 14:30
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@fasiha
fasiha / no-hackerrank.md
Last active August 7, 2023 11:47
A prospective employer invited me to do a HackerRank test. Here's my proposed alternative.

Well, that was unexpected. In the following, I’m trying to follow Jon Evans’ advice from “The Terrible Technical Interview”.


To: recruitment@EmployerABC.com
From: Ahmed Fasih
Subject: Re: Programming Test Invitation

Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.

@jmoy
jmoy / thin-film.ipynb
Last active November 18, 2018 19:51
Why soap bubbles are colorful and windowpanes are not
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API