about everything, life in Turkish, professional in English.
Don't wanna be here? Send us removal request.
Text
What is Randomize?
I am a very big of what Medium brought to the digital publishing platform; such an elegant and readable experience in a centralized location. So, I wanted every other website to be like Medium.
This is why we wanted to create Randomize with 2 of my friends. I wanted to read every other website in an elegant design.
What does Randomize do?
Randomize, parses other websites' content and finds the readable content inside of it. So, you won't have to see distracting content.
What basically randomize's content extractor does is:
What's different about Randomize?
Every other service out there like -Pocket, InstaPaper and Readability already makes this. But we wanted to have more space and we didn't want those links to be personal, instead we would like them to be categorized for ourselves and readable by everybody. So, posts inside of a Bucket are public unless the otherwise has been chosen so.
We wanted Randomize to be a place where everyone can read and share the contents they have found everywhere else and bookmark them in a social way.
But, don't go, we all love Pandora, right? The most beautiful thing about for me at Pandora is that I don't have to think about what I am going to listen.
Randomize exactly does this for content, but, not only for music but for readable posts for starters.
Where does the content come from?
Content comes from you. But, the thing is, just because it is new and we would like to slow things down, posting content to the website will not be for everyone. You will need a special link to become a content creator.
But, don't worry, reading content is not exclusive to the registered users. Everybody can come here and hit the button and read something.
This is new!
If you have come this down, I guess you think that randomize is cool. But, let me say this, it has lots of bugs. So please email me if you find any kind of bugs. It's still under active development, but I am hoping to make it better with you. So please don't hesitate to send a mail to me.
1 note
·
View note
Link
Caleb Davenport recently asked the following question on Twitter:
Is there a small CocoaPod that does NSDictionary to and from form encoded string and nothing else?
— Caleb Davenport (@calebd)
January 21, 2014
He knew that this functionality already exists in a number of larger...
24 notes
·
View notes
Text
Checkout only one file from SVN
If you try to checkout only one file from SVN:
➜ svn co svn://someurl/somedirectory/somefile.ext
it will give you an error:
➜ svn: E200007: URL 'svn co svn://someurl/somedirectory/somefile.ext' refers to a file, not a directory
This is a shame because what if I want to edit only one file inside of a repository which sizes billion gigabytes.
Thanks to this StackOverflow question, I learned how to checkout only one file or checking out single files whenever I want to.
➜ svn co svn://someurl/somedirectory <target> --depth empty
This code above will create a directory to the target with the name of somedirectory and will initialize .svn folder inside of it. But, there won't be another gigabytes of files or folders. It will be empty. Now the tricky part:
➜ cd somedirectory ➜ svn up somefile.ext
That command above will download the only file you wanted.
1 note
·
View note
Text
Reload Data of UITableView After going 'Back'
Let's say you are editing data on phone, and after you are done with your edit you are clicking the Save button, and programmatically returning back to the ViewController you were in before with:
[self.navigationController popViewControllerAnimated:YES];
But, if you do this, and you are depending on the changed data, It won't change until you make changes to the root ViewController's viewWillAppear:animated method.
I was always using viewDidLoad instead of viewWillAppear. And most of the times it gave me the results that I expect.
But, the thing about viewDidLoad is that it's being called just once, when the ViewController is being initialized for the first time. But viewWillAppear will be called every time you open that ViewController.
So, as a solution to reload data every time when a ViewController shows up, you can use:
- (void)viewWillAppear:(BOOL)animated { [self.tableView reloadData]; [super viewWillAppear:animated]; }
0 notes
Text
contains Method for NSString
To have a contains method for all NSString objects you are using, create a category and add a method to it like the one below.
- (BOOL)containsString:(NSString *)substring { return [self rangeOfString:substring].location != NSNotFound; }
0 notes
Text
AFNetworking 2.0 Custom Response Content-Type
I started to work on our iOS app in my job. I needed to get data from our web service so that I can show that data to our users. But the thing is we are using our own custom prefixes on the response headers' Content-Type.
So, I needed to figure out a way to make AFNetworking with that response's custom Content-Type. There is no indication at docs to understand how to achieve that kind of thing, so after a couple of reading through StackOverflow questions and GitHub issues, I managed to find a way and wanted to share it.
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager GET:@"http://example.com/resources.json" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"JSON: %@", responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@"Error: %@", error); }];
Above is the basic way to make a GET request.
The trick is to set the manager's serializer's acceptableContentTypes, which takes a NSSet as a parameter before making any request.
So the easy way is creating a new NSSet with your own custom content type and set it to the acceptableContentTypes:
NSSet *contentTypes = [NSSet setWithObjects:@"custom/content-type", nil]; manager.serializer.acceptableContentType = acceptableContentType;
So the final code would be:
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; // we are setting custom content types here NSSet *contentTypes = [NSSet setWithObjects:@"custom/content-type", nil]; manager.serializer.acceptableContentType = acceptableContentType; [manager GET:@"http://example.com/resources.json" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"JSON: %@", responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@"Error: %@", error); }];
0 notes
Text
JavaScript Data Structures
Recently I got available for the market, I made 1 interview and I got declined. After that I realized that even though, I implemented a RESTful API with PHP, it is not enough for getting through interviews. Because I forgot the theory, how to solve the basic algorithms.
So I decided to move on, and started to implement the things I learned from my Data Structures class, which are basic data structures, in JavaScript.
I am maintaining this project at github
Feel free to fork and use it as is. And maybe someone can contribute, or at least look for my wrongs, and tell me how to improve it.
And yes, you heard me right, I am looking for a job. Maybe we could chat.
0 notes
Link
There should be some times, where the businesses continue to do what they are good to do, but making money out of it. Because it takes a lot of work to do these kind of things, and I am really comfortable the way instagram implements it.
Over the past three years we’ve watched with amazement as Instagram has grown to a global community of more than 150 million people capturing and sharing the world’s moments. Instagram is a place where people come to connect and be inspired, and our focus with every product we build is keeping it...
550 notes
·
View notes
Text
Laravel and Image Operations with Intervention Image Class
Today i needed to implement a image resizing solution for background processing. Basically, first i get the original, i save it to local server, i put the name of the file to the queue (Specifically Amazon SQS) and Thanks to great artisan task supplied by laravel i can poll the queue by simply writing:
$ php artisan queue:listen
Anyway, I needed to find a good image manipulation tool for php. I used Imagine, ImageWorkshop before, but i needed a simple solution, we are not putting the filtering or other image processing jobs to server, simply front-end apply those jobs and send final image to server. Basically both the former libraries are perfect, but they are like Photoshop. You can do anything you want, but heavy, and a simple process like crop can be somewhat more complicated.
While i was browsing packages through packagist, I met with Intervention Image Class. It's a fully tested, lightweight Image Class. It doesn't do so much thing, but it does the perfect job. And, most importantly, it's coming with laravel support, such as its own Service Provider and Facade. It has a nice, laravelish syntax:
$image = Image::make('path/to/the/image');
So i really liked it, one of the best things it shocked me the grab() function. It simply takes best possible image when given the width and height. So, it's like smart crop. I know i couldn't exactly express myself but, these example from the documentation would really help you to understand the meaning of grab function:
// crop the best fitting 5:3 (600x360) ratio and resize to 600x360 pixel $img->grab(600, 360); // crop the best fitting 1:1 ratio (200x200) and resize to 200x200 pixel $img->grab(200);
We are producing several different sizes of the same photo for the use of different purposes. One of those purposes is thumbnail. I needed to get the best square out of the photo if it is not square to make it a thumbnail. So grab would fit into the job perfectly.
I am just doing:
$image->grab(50, 50) // gets the best square, ->save(\Hash::make( // resize it to 50x50, (new \DateTime)->getTimeStamp() . '.jpg', 90 // and save it as jpg ); // and make the quality of 90.
You see, it is just 1 line of code with sweet chaining.
This post is migrated from my experimental blog
1 note
·
View note
Text
ubuntu12.04 and php5.5 related
Recently I found out that (yes just out because i am n00b) nginx+php-fpm through unix sockets has really good performance boost for php execution. I tried to use the builtin packages of ubuntu for both php-fpm and php-cli. But the worst thing about them that they are still php5.3. I want to use php5.5, because at like i mentioned at my previous post, I started to use php5.5 specific apis. So, i decided to compile php5.5 from scratch. It seems really hard but, actually compiling from scratch gives you the power of using only necessary extensions of php.
What i understood from php.net documentation is that now the php-fpm is builtin to the php source code. it requires the necessary keywords in the configure phase. My php ./configure statement is like this:
'./configure' \ '--enable-opcache' \ '--prefix=/opt/php' \ '--with-mysql=mysqlnd' \ '--with-mysqli=mysqlnd' \ '--with-tidy=/usr' \ '--with-curl=/usr/bin' \ '--enable-openssl' \ '--with-openssl' \ '--with-zlib-dir=/usr' \ '--with-xpm-dir=/usr' \ '--with-pdo-mysql=mysqlnd' \ '--with-xsl=/usr' \ '--with-ldap' \ '--with-xmlrpc' \ '--with-iconv-dir=/usr' \ '--with-snmp=/usr' \ '--enable-exif' \ '--enable-calendar' \ '--with-bz2=/usr' \ '--with-mcrypt=/usr' \ '--with-gd' \ '--with-jpeg-dir=/usr' \ '--with-png-dir=/usr' \ '--with-freetype-dir=/usr' \ '--enable-mbstring' \ '--enable-zip' \ '--with-pear' \ '--with-libdir=/lib/x86_64-linux-gnu' \ '--with-config-file-path=/opt' \ '--enable-fpm' \ '--with-fpm-user' \ '--with-fpm-group' \ '--enable-sockets' \ '--with-sockets'
i am installing php to the /opt/php/ just for personal habits. So, in order to have the php as global, you can type export PATH=/opt/php/bin:$PATH to your ~/.bashrc or ~/.zshrc or whatever shell type you're using.
this will give you many errors if you don't have the necessary libraries are not installed in your computer. To get around from this you can execute this command as root in ubuntu12.04:
apt-get build-dep php5
actually i didn't know about this command before, i manually apt-get'ed the necessary libraries one-by-one. So, i don't know if this command is really doing what is supposed to do. So, if you still get errors while you are configuring php, simple google search will help you. afaik:
apt-get install lib<library-name>-dev
command will work with almost every dependency.
one last thing, if you are compiling for your development environment and want the xdebug to work with, you can type the following as root on command line:
pecl install xdebug
this will install the xdebug, and the necessary compilings, but you still may need to make necessary edits to the php.ini file. if you're having errors about xdebug, add the following to your php.ini file:
zend_extension=xdebug.so
This post is migrated from my experimental blog
0 notes
Text
Laravel and PHP5.5 Related
Today i started a fresh laravel 4 for our newest product, which has only a code name of 'ProjectX'. Recently, i found out that php5.5 has been released, and thrilled by its builtin support of Zend opcache. Which gave me 500% performance boost.
Since i started to use php5.5, i saw that there is a new API for class names. Because, I started to use my own namespaces with the models, i've been hardcoding the name of the classes with full namespaces in them, when i need to make model relationships. But, now whenever i use:
use ProjectX\Models\User;
I now can do
User::class
and it will return, ProjectX\Models\User
This post is migrated from my experimental blog
0 notes
Text
Cevapsız
Şu sıralar ancak bir şey karalayabiliyorum, ne bir bütünlük sağlayabiliyorum ne de ahenk. Hadi madem bütün değilsiniz, dağınık niye olmuyosunuz? Sorarlar adama, sen hiç mi uğraşmıyorsun? Neden böyle oldu diye. Diyorum ya, sadece karalayabiliyorum. Buna bile verecek cevabım yok.
2 notes
·
View notes
Text
ozlemek.
cok uzun zaman olmustu ozlemeyi bu kadar derin, yogun hissetmeyeli. her seyin anlamlanmasiymis belki de sebep olan ozlemi unutmaya. gun gectikce, gercekler daha da belirginlesince, o kadar sacma o kadar anlamsiz gelmeye basladi ki. her sabah bogrumde kocaman bir yumruk, yatmadan once de keza.. yorgunluk dedikleri bu olsa gerek.
yalniz kalmak, en korkucu olm. zor bu hayat. sorumsuzluk en buyuk dusman. sorumluluk da nerden cikti ki zaten?
ne zaman buyuduk ki be? zor olmadi mi gene? ne guzel yasiyoduk halbuki. 2 hafta sonradan itibaren, ben de yokum hayatta. duygularimi kaybediyorum resmen. olmak istedigim yer neresi? insan mi, ulke mi? kimle ya da neyle olmam lazim? hangisi daha mutlu edici? hangisi daha mantikli? mantik diye bir sey var mi?
biliyorsan bu sorularin cevaplarini, gel de anlat hadi bana be.
ozledim iste, butun gevelemelerim bundan ibaret. seneler sonra ilk kez gercekten, tam derinden, iliklerime kadar hissederek ozluyorum. seni ozluyorum en cok. ama ben hayatimi ozluyorum. hayatin ne demek oldugunu siktir ettigim zamanlari ozluyorum. kokunu ozluyorum en cok. her saniye daha fazla ozluyorum. benim basarmak istediklerim, seninle olma istegimin yaninda bir hic kaliyor. gel benimle ol diyemem ki sana. nasil diyeyim. ama sen bana gel benimle ol diyebilmeni istiyorum belki de. hos gel desen simdi, olmasi gerekenler var olmaz diyecegim sana. ama sen israr etsen, belki tak edicek canima ve evet dicem ben hep seninle olmak istiyorum. ama iste filmde mi yasiyoruz sanki amk? gelsem nolur ki simdi zart diye yanina? gelemem ki. sorumluluklar gene burda devreye giriyor iste.
kafasi rahat olan adamlar, en cok size ozeniyorum duyun sesimi.
0 notes
Text
ey sevgiliye
1 saniye aklimdan ciktigin an, dunyanin ne kadar boktan bi yer oldugunu anlayip tovbe estafurullah cekiyorum hatun. iyi ki cikmiyorsun aklimdan, iyi ki dunyam sensin. hele ki simdi, iyi ki baktigim her yerde sen varsin.
0 notes
Text
her sey kaldigi yerden
gecen sene ilk denizliye dondugumde farketmistim huyumu, artik nerde yasadigim bana koymaz oldu. her yer ayni gibi, her ne kadar cok farkli oldugunu biliyor olsam da. garip bir yetenek gelistirmisim artik. denizlideysem denizli kafasi, kaldigi yerden. istanbuldaysam, istanbul. binghamton'daysam, binghamton. 2. kez gelisimde gene her sey yerli yerinde, ama bir burukluk, bir stres alip basini gidiyo.
Rahatlamak icin yazmaya calisiyorum bunlari zaten, ama devam edesim bile gelmiyor. garip bir ruh hali iste anlam veremiyorum. gene bok gibi yagmurlu burasi, ama kodumunun nemi buraya da sicramis. biz mi yanimizda getiriyoruz bilmiyorum.
Tutku, kararlilik. tek aradigim seyler bunlar oldu sadece. bulabilmeyi istiyorum. bulamiyorum. uzuluyorum.
sorun yok aslinda. kendime yaptigim salak kuruntular. gene her zamanki gibi boktan bi donemdeyim. cok cabuk cikacagimi biliyorum, ama gene de toparlamak zor geliyo bana. sanki toparlamak istemezmis gibiyim.
zorum bu aralar. kolaylamaya kasiyorum.
1 note
·
View note
Text
bugun, gercekleri farkederek, en yakin arkadaslarimin 2'siyle belki de uzun bir sure hic gorusmeyecek uzere ayrildim. demin oldu bu. ve bu bana cok koydu. cunku arkadas degil onlar, karaktersizlik olur onlara arkadas demek.
onlar her sey. onlar kardes. onlar dost.
0 notes
Text
gariplikler icinde
Neyi ne yapacagimi belli edecek, hayatimin sonrasini bi' nevi belirleyecek kararlar alma vaktim cok yaklasti. zorlaniyorum bu aralar bu yuzden. hayaller.. hangi hayal daha fazla. hangisi daha agir diye sorguluyorum bu aralar. muzik dinlemeyi gene biraktim. aslinda muzik dinlemeyi birakmadim, eskilere geri dondum biraz, <new-age punk> olaylari agir basti gene bu aralar. ama onlar da eskisi gibi gelmiyo ki beynime, bir sure sonra kafami agritiyorlar resmen.
dusundum hep, mevcutdegil nedir ki diye? garip bir sekilde benim en buyuk karakteristik ozelliklerimden biri aslinda 'mevcutdegil' isminin arkasindaki sebep. ozentilik. bir arkadasim blog yazmaya baslamisti blogspotta, digeri de guzel bi isim almisti gene blogspottan, isim alakasizdi blogla, ama guzel bi ambians olusturuyordu aslinda, ben de dedim boyle bisey bulayim; buldum, kullandim.
o degil de nerdeyse 2 sene olmus lan acali burayi. hayatimda en maymun istahli olarak kullandigim yerlerden biri heralde burasi. durmadan degisti tasarim. ama bu hali en cok hosuma gidenlerden biri bu arada..
simdi geriye bakiyorum aslinda, sadece buradaki postlari okuyarak 1 yil bilmemkacay suresi icersinde ne kadar degistigimi bile gorebilir aslinda herkes. seviyorum olm burayi. yazmayi da seviyorum, reblog yapmayi da seviyorum. ha bu arada ben cok gereksiz insanlari takip ediyormusum burada onu da farkettim. bi yenilemeye gitmek lazim.
yakinda diablo3 postlariyla da gelicem, cilgin aticam. degisik isler pesindeyim ayni zamanda. duygusal yazmak icin baslamistim aslinda bu yaziya da, ama bu aralarki ruh halim duygusal olmama izin vermiyor aslinda. biraz da bunu gorebiliriz yazidan da. tipki ben amerikadayken beynimin insanlari ozlememe izin vermedigi gibi, simdi de beynim duygusallasmama izin vermiyor galiba. ya da kalbim.. kim bilir.
ama emin oldugum bazi seyler var canimin ici. onlardan en onemlisi de, sensin sen. sen hep burdasin, dun burdaydin, yarin da burada olacaksin. o yuzden benim icim cok rahat. ister 3 sene ister 1231242149128 sene. sen hep bir nefes kadar yakin, vucudumun her yerinde nefesinle benimlesin hep. biz uzulmicez, zorlanicaz belki ama biz uzulmicez. biz burdayiz birader, bize yan bakan uzasin gitsin. biz bizle guzeliz. seni seviyorum.
0 notes