Skip to content

Instantly share code, notes, and snippets.

View furkantektas's full-sized avatar

Furkan Tektas furkantektas

View GitHub Profile
@furkantektas
furkantektas / Muxes.v
Created November 23, 2013 20:45
2:1 4:1 8:1 Mux using structural verilog
module mux2to1(a,b,sel,out);
input a,b,sel;
output out;
tri out;
bufif1 (out,a,sel);
bufif0 (out,b,sel);
endmodule
module mux4to1(a,sel,out);
input [3:0] a;
@furkantektas
furkantektas / or.v
Created November 23, 2013 20:46
4bit, 8bit, 16bit, 32bit OR gates for structural verilog
///////////////////////// OR GATES /////////////////////////
module or4(out,in1,in2);
input [3:0] in1, in2;
output [3:0] out;
or t1(out[3], in1[3], in2[3]),
t2(out[2], in1[2], in2[2]),
t3(out[1], in1[1], in2[1]),
t4(out[0], in1[0], in2[0]);
endmodule
@furkantektas
furkantektas / nor.v
Created November 23, 2013 20:46
4bit, 8bit, 16bit, 32bit NOR gates for structural verilog
///////////////////////// NOR GATES /////////////////////////
module nor4(out,in1,in2);
input [3:0] in1, in2;
output [3:0] out;
nor t1(out[3], in1[3], in2[3]),
t2(out[2], in1[2], in2[2]),
t3(out[1], in1[1], in2[1]),
t4(out[0], in1[0], in2[0]);
endmodule
@furkantektas
furkantektas / and.v
Created November 23, 2013 20:47
4bit, 8bit, 16bit, 32bit AND gates for structural verilog
///////////////////////// AND GATES /////////////////////////
module and4(out,in1,in2);
input [3:0] in1, in2;
output [3:0] out;
and t1(out[3], in1[3], in2[3]),
t2(out[2], in1[2], in2[2]),
t3(out[1], in1[1], in2[1]),
t4(out[0], in1[0], in2[0]);
endmodule
@furkantektas
furkantektas / ShadowedTypefaceSpan.java
Last active August 29, 2015 13:56
This is a TypefaceSpan with shadow.
import android.text.TextPaint;
import android.text.style.TypefaceSpan;
/**
* Created by Furkan Tektas on 15.02.2014.
*/
public class ShadowedTypefaceSpan extends TypefaceSpan {
private float radius;
private float dx;
private float dy;
@furkantektas
furkantektas / findRaspberry.sh
Last active August 29, 2015 14:00
Finds and prints the IP of Raspberry PI in 192.168.2.*
#!/bin/sh
sudo nmap -sP 192.168.2.* | grep -B 2 -i raspberry
@furkantektas
furkantektas / camera_stream_http_h264.sh
Last active August 29, 2015 14:00
Raspberry PI Camera | Infinite Video Stream {h264|15fps}
#!/bin/sh
# starting raspberry camera stream at http://RASPBERRYIP:8090
raspivid -o - -t 0 -hf -vf -w 640 -h 480 -fps 15 | cvlc stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
@furkantektas
furkantektas / camera_stream_rtsp_640x480_25fps.sh
Created May 1, 2014 18:39
Raspberry PI Camera | Infinite Video Stream {rtsp|25fps|640x480}
#!/bin/sh
# Streaming Url: rtsp://RASPBERRYIP:8080/stream.sdp/
raspivid -o - -t 0 -w 640 -h 480 -fps 25 -n | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8080/stream.sdp/}' :demux=h264
@furkantektas
furkantektas / opencv-overlay-text-on-stream.cpp
Last active April 30, 2020 19:59
OpenCV Overlay Text on Stream
// Standard C++ Libraries
#include <iostream>
#include <sstream>
#include <string>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using std::cout;
@furkantektas
furkantektas / hcs12_project_main.c
Last active August 29, 2015 14:01
HCS12 Garage Simulation Project
#include <hidef.h> /* common defines and macros */
#include "derivative.h" /* derivative-specific definitions */
#include <stdio.h> /* derivative-specific definitions */
#include <stdlib.h>
#include "lcd.h"
#pragma CODE_SEG __NEAR_SEG NON_BANKED
// ASM
#define enable_intr() __asm(cli)