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 / configOpencv.md
Last active August 29, 2015 14:08
OpenCV sample code for testing CodeBlocks

Configuring CodeBlocks 12.11 IDE for use with OpenCV 2.4.3

I have gone through so much pain trying to get CodeBlocks being able to properly use the OpenCV libraries on my system so I decided to write a little something about it.

I have Ubuntu 12.04 LTS with CodeBlocks 12.11 (latest stable) and OpenCV 2.4.3 libraries. Follow these steps to setup CodeBlocks IDE to use OpenCV 2.4.3.

Make sure that you have OpenCV installed on your system. There is an excellent guide to follow here that will walk you through the process. You can test your installation by following this guide here.

You can find out where OpenCV and its libraries are installed on your system by using these commands in bash:

@talayhan
talayhan / gist:0eb1c41a3a31c0508a0d
Created February 23, 2015 10:11
Android - How to get video/audio file details using MediaMetadataRetriever class ?
package net.talayhan.android.vibeproject;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
@talayhan
talayhan / hcs12_Notes_Part1.md
Last active August 29, 2015 14:16
HCS12 Microcontroller Notes Part1

HCS12 Microcontroller Notes

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

Memory Types

Ram: Random Access Memory (can read and write)

@talayhan
talayhan / priority_inversion_donation.md
Last active September 2, 2015 07:27
Priority Inversion ve Donation Nedir ?

Priority Inversion ve Donation

Priorty Scheduling

Priorty scheduling schedule işleminde bir sonraki process veya thread den hangisinin CPU yu kullanacağının karar verilmesidir. Priority bu genelde integer olan bir değer, her thread e önem sırasına göre atanır. Çalışmaya hazır olan yani READY STATE de bulunan threadlerden en yüksek priority e sahip olan seçilerek çalıştırılır. Buradaki mantık en yüksek öneme sahip olan thread işini ilk yapmalı, daha düşük öneme sahip threadler bekleyebilir. Genelde threadler prioritylerine göre sıralı bir queue veri yapısında tutulmaktadır böylece hep bir sonraki thread en yüksek öneme sahip thread olarak tutulmaktadır.

@talayhan
talayhan / .Renviron
Last active August 29, 2015 14:17
R stuff
R_LIBS_USER="~/R"
@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

@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 / 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 / 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 / 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