Skip to content

Instantly share code, notes, and snippets.

View talayhan's full-sized avatar
💤
Sleeping

Samet Talayhan talayhan

💤
Sleeping
View GitHub Profile
@talayhan
talayhan / androidTricks_01.java
Last active August 30, 2017 21:16
Android Thread Tips and Tricks
/* You can run thread as specifically time 1 minute, 1 second, 1 hour etc. Whenever you want. */
ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(5);
scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
// do something here.
sendThread();
}
}, 0, 1, TimeUnit.SECONDS);
@talayhan
talayhan / hw2Mac.r
Last active August 29, 2015 14:19
R
# -------------------------------
# Homework 2 - Machine Learning
# Samet Sait Talayhan
# -------------------------------
# o / \ //\
# o |\___/| / \// \\
# /0 0 \__ / // | \ \
# / / \/_/ // | \ \
# @_^_@'/ \/_ // | \ \
# //_^_/ \/_ // | \ \
@talayhan
talayhan / alias.sh
Last active August 29, 2015 14:18
How to use and when alias command in Linux.
The alias command allows you to create command shortcuts within your shell. Below shows you how,
move to your home directory,
[root@localhost ~]# cd ~
add the alias
[root@localhost ~]# cat >> .bash_profile
[root@localhost ~]# alias fucking='su -'
@talayhan
talayhan / SaaS_berkeley_ozet.md
Created March 25, 2015 08:54
Engineering SaaS An Agile Approach (04.25.15) - Berkeley Slide Summary

Engineering SaaS An Agile Approach (04.25.15) - Berkeley Slide

Waterfall vs Agile

  • Agile developlemnt da developer her iterasyonda customer feedback ile ürünü geliştirir.
  • Agile süreç hatanın daha az olması için Test-Driven Development'ı önerir.

Spiral

@talayhan
talayhan / os_project_1b.md
Created March 24, 2015 20:16
Operating System Project 1B Turkish Explanation

Pintos Project 1-B

Bu ödevde lottery scheduling algoritmasını implement etmeniz bekleniyor.

Lottery scheduling algoritması söyle çalışır : Sisteme yeni bir thread katıldığında işletim sistemi elindeki biletlerden bir kısmını (en az bir tane en fazla k tane olacak şekilde) yeni gelen thread’e verir. İşletim sistemi thread switch yapacağı zaman dağıttığı biletlerden bir tanesini random olarak seçer ve o bilet hangi threadde ise o threadi çalıştırır.

Bu durumda bir threadin prioritisi o threadde bulunan bilet sayısı ile doğru orantılı olacaktır.

>Bir örnek verecek olursak : Sistemde A , B ve C threadleri bulunsun ve bunların ellerindeki bilet sayıları sırasıyla 5,3 ve 2 olsun. Bu durumda B’nin seçilme ihtimali %30 ‘dur. Sistemde B ve C olsaydı sadece B’nin seçilme ihtimali %60 olacaktı.

@talayhan
talayhan / rorDep.md
Last active August 29, 2015 14:17
RoR dependencies.

Installing Ruby

The first step is to install some dependencies for Ruby.

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
@talayhan
talayhan / monitisePre.md
Created March 23, 2015 12:01
Monitise aka (Pozitron) Presentation Notes

GTU-Tech Talk Mobile - 03.23.15

Mobile Dev Methods

  • Two sides of this
  • Server side maintanable, scalable
  • Client side
@talayhan
talayhan / getLowestNumber.asm
Last active August 29, 2015 14:17
HCS12 Lab 2 Work Sheet
;*****************************************************************
;* This stationery serves as the framework for a *
;* user application (single file, absolute assembly application) *
;* For a more comprehensive program that *
;* demonstrates the more advanced functionality of this *
;* processor, please see the demonstration applications *
;* located in the examples subdirectory of the *
;* Freescale CodeWarrior for the HC12 Program directory *
;*****************************************************************
@talayhan
talayhan / gist:75815f0fad4cc37ab263
Created March 21, 2015 11:45
Common Port Numbers

###Common port numbers

Main article: List of TCP and UDP port numbers The Internet Assigned Numbers Authority (IANA) is responsible for the global coordination of the DNS Root, IP addressing, and other Internet protocol resources. This includes the registration of commonly used port numbers for well-known Internet services.

The port numbers are divided into three ranges: the well-known ports, the registered ports, and the dynamic or private ports.

The well-known ports (also known as system ports) are those from 0 through 1023. The requirements for new assignments in this range are stricter than for other registrations.[2]

Examples include:

@talayhan
talayhan / hcs12_Notes_Part2.md
Last active August 29, 2015 14:17
hcs12_Notes_Part2.md

HCS12 Microcontroller Notes

NOT: Bu döküman HCS12 2. Labı için oluşturulmumş çalışma notlarıdır, lab soruları ve cevapları, lab sonrası eklenecektir. Dili yarı Türkçe olucak şekilde kullanılmaya gayret gösterilmiştir.

Slayt 3

HCS12 Addresing Modes