Skip to content

Instantly share code, notes, and snippets.

View eren's full-sized avatar

Eren Türkay eren

View GitHub Profile
@eren
eren / zlibDecompress.kt
Created April 4, 2019 10:53
Zlib Inflate/Decompress in Kotlin
/**
* Zlib decompress a file and return its contents
*
* @param filePath absolute path to file
* @return unzipped file contents
*/
fun decompress(filePath: String) : String {
val content = File(filePath).readBytes()
val inflater = Inflater()
val outputStream = ByteArrayOutputStream()
def max_difference(numbers):
max_diff = -1
# The number of elements are given normally but I'm feed with
# only the arrays. So I need to count them. I dont know why
# some tests are failling but it's probably because of the
# big numbers
for i in xrange(len(numbers)):
for j in xrange(len(numbers)):
# This is the main condition for the solution.
@eren
eren / install-tinyproxy.sh
Created April 6, 2015 12:32
Twitter'a erismek icin proxy sunucusu kurulumu
#!/bin/bash
#
# Eren Turkay <turkay.eren@gmail.com>
# 2015-04-06
#
# Sunucunuza twitter'a erismek icin proxy kurar. Twitter ayarlarindan
# tinyproxy'nin oldugu sunucunun IP adresini ve 8888 portunu HTTP Proxy olarak
# belirleyin.
#
# Telefonda VPN cok pil tukettiginden basit bir proxy sunucusu ile twitter'a
// Use this loader on only pagechange event. The loaded element
// is automatically parsed, current page and url are deduced
// from it.
//
// Eren Turkay <turkay.eren@gmail.com>
// 2014-08-25
//
// Based on http://www.integralist.co.uk/posts/jquery-mobile-loading-script-files/
ScriptLoader = function() {
var pages = $('div[data-role="page"]');
AirTies 4310 Wireless Router RootFS
===================================
http://airties.com.tr/products/wap/Air4310
rootfs: Squashfs filesystem, little endian, version 3.0, 2140459 bytes, 512 inodes, blocksize: 65536 bytes, created: Fri Dec 24 17:34:14 2010
squashfs-root
├── bin
│   ├── [ -> busybox
│   ├── [[ -> busybox

Keybase proof

I hereby claim:

  • I am eren on github.
  • I am eren (https://keybase.io/eren) on keybase.
  • I have a public key whose fingerprint is 823D 6461 C54A 22E5 C553 E831 E33B 6CC9 BA1E 1713

To claim this, I am signing this object:

#lang plai
;Copyright (C) 2014 Eren Türkay <turkay.eren@gmail.com>
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.
;
;This program is distributed in the hope that it will be useful,
#-*- encoding: utf8 -*-
#
# Copyright (C) 2013 Eren Türkay <turkay.eren@gmail.com>
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
@eren
eren / philosopher.c
Last active December 17, 2015 10:18
/*
Copyright (C) 2013 Eren Türkay <turkay.eren@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@eren
eren / philosopher.h
Last active December 17, 2015 10:18
/*
Copyright (C) 2013 Eren Türkay <turkay.eren@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of