Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ilkereroglu on github.
  • I am ilkereroglu ( on keybase.
  • I have a public key ASB65HaPtUnJ9-urvM0b57JYALAXlmVmW15c23BuqBnKbQo

To claim this, I am signing this object:

ilkereroglu /
Created February 22, 2018 19:33 — forked from rushilgupta/
Concurrency in golang and a mini Load-balancer


Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".

Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).

Let's dig in:


ilkereroglu /
Created August 31, 2016 11:18
How to install Go Lang on CentOS | AWS

How to Install GO Lang on CentOS / Amazon Linux?

sudo wget
tar -xzf go1.4.2.linux-amd64.tar.gz 
export PATH=$PATH:$GOROOT/bin 
export GOBIN=$GOROOT/bin 
mkdir ~/golang/ 
export GOPATH=~/golang/ 
ilkereroglu / Procfile
Created April 29, 2016 11:44
Kendi Slackbot’unu yazmak
web: node app'/selam', function (req, res, next) {
var userName = req.body.user_name;
var bot = {
text : userName + 'Ooo cahil bey hoşgeldiniz.'
if (userName !== 'slackbot') {
return res.status(200).json(bot);
} else {
return res.status(200).end();
ilkereroglu / app-1.js
Created April 28, 2016 22:05
Kendi Slackbot'unu yazmak
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
var port = process.env.PORT || 1666;
app.use(bodyParser.urlencoded({ extended: true }));
app.get('/', function (req, res) {
ilkereroglu / package.json
Last active April 30, 2016 22:09
Kendi Slackbot’unu yazmak
"name": "ilberHocaBot",
"version": "0.0.1",
"description": "Node Server",
"main": "app.js",
"author": "İlker Eroğlu",
"license": "MIT",
"dependencies": {
"express": "^4.x.x",
"body-parser": "^1.x.x",
ilkereroglu /
Created September 22, 2015 21:53
How To Send E-Mail On CentOS 7

Installing mailx

yum -y update
yum install -y mailx

We can now start sending e-mails using

ilkereroglu /
Created September 22, 2015 14:22
How To Configure Static IP On CentOS 7

Configure eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0