Skip to content

Instantly share code, notes, and snippets.

Gokberk Yaltirakli gkbrk

Block or report user

Report or block gkbrk

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
gkbrk /
Created Aug 25, 2015
Dictionary server in Rust.
use std::io::prelude::*;
use std::net::{TcpListener, TcpStream};
use std::io::BufReader;
use std::thread;
use std::fs::File;
fn get_definitions(word: String) -> Vec<String>{
let mut dict = File::open("dict.txt").unwrap();
let mut reader = BufReader::new(dict);
let mut matches: Vec<String> = Vec::new();
gkbrk / list.json
Created Feb 23, 2015
DontBeLazy Block List
View list.json
View AsteroidsGame.cpp
#include <vector>
#include <iostream>
#include <SDL2/SDL.h>
#include "GameState.h"
class AsteroidsGame: public GameState{
void Draw(){
gkbrk / terminalplayer.c
Created Feb 28, 2016
Terminal radio player
View terminalplayer.c
#include <ncurses.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
typedef struct station {
char name[256];
char url[256];
} station;
gkbrk /
Created Apr 11, 2016
Serie tracker
#!/usr/bin/env perl
use strict;
use warnings;
use HTTP::Tiny;
sub http_get {
my $http = HTTP::Tiny->new;
return $http->get($_[0])->{content};
gkbrk / referrerparse.go
Created Aug 17, 2016
Referer log parser
View referrerparse.go
package main
View Cargo.toml
name = "urlshortener"
version = "0.1.0"
authors = ["Gökberk Yaltıraklı <>"]
nickel = "*"
hyper = "*"
rand = "0.3.11"
gkbrk /
Last active Apr 18, 2017
Todo.txt to graph
import matplotlib.pyplot as plt
import datetime
def get_stats(filename):
data = {}
with open(filename) as todofile:
for line in todofile:
date = line.split()[1]
if date in data:
gkbrk /
Created Aug 10, 2015
Python client test
import curses
import sys
import random
import hackchat
import threading
class HackClient:
def __init__(self, nick, channel):
self.nick = nick = channel
gkbrk /
Created Dec 10, 2015
Rust MD5 [AdventOfCode]

Is Rust's MD5 Slow? Heck no!

Today I came across this post on the Rust subreddit. Basically it is comparing two MD5 Miners written in Python and Rust. The miner is written for a code challenge called Advent of Code.

To be honest, speed is one of the things I love about Rust, so seeing Rust being blown away by Python (which I also like and use a lot) made me sad. I decided to make this a bit more fair for Rust so I made a very short piece of Rust code to complete this challenge FAST.

The challenge

The challenge, as written on the Advent of Code page is as follows:

  • You are given a key, for example abcdef.
  • You are looking for a string that is made by taking the MD5 of this key plus a number. This hash has to start with 5 leading zeros. (Like abcdef609043)
You can’t perform that action at this time.