Skip to content

Instantly share code, notes, and snippets.

View barbarbar338's full-sized avatar
☢️
works on my machine

Barış DEMİRCİ barbarbar338

☢️
works on my machine
View GitHub Profile
@barbarbar338
barbarbar338 / Nerd-Font-on-Termux.md
Created August 24, 2025 11:13
Install and use NerdFonts on Termux
  • Install dependencies: $ pkg install git make
  • cd into home folder: $ cd ~
  • Clone termux-nerd-install: $ git clone https://github.com/notflawffles/termux-nerd-install.git
  • cd into termux-nerd-install: $ cd termux-nerd-install
  • Build installer: $ make install
  • List available fonts: $ termux-nerd-installer list available
  • Select a font you want from the list. For example, I want to install fira-code to my termux.
  • Install font: $ termux-nerd-installer install fira-code
  • Use font: $ termux-nerd-installer set fira-code
  • Restart termux
@barbarbar338
barbarbar338 / docker-compose.yml
Last active July 28, 2025 17:29
MinIO with OpenMaxIO web interface
services:
minio:
image: quay.io/minio/minio:latest
command: server /data --console-address ":9001"
ports:
- 9000:9000
- 9001:9001
environment:
MINIO_ROOT_USER: <ROOT_USERNAME>
MINIO_ROOT_PASSWORD: <ROOT_PASSWORD>
@barbarbar338
barbarbar338 / jkflop.vhdl
Created April 29, 2025 19:06
JK-flip-flop code for Basys3
-- barbarbar338
library ieee;
use ieee.std_logic_1164.all;
entity jk_flip_flop is
port (
clk : in std_logic;
j : in std_logic;
k : in std_logic;
q : out std_logic;
@barbarbar338
barbarbar338 / 3-bit-counter.vhdl
Last active April 28, 2025 20:08
3-bit up counter for basys3
-- barbarbar338
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity main_counter is
Port (
clk_in : in std_logic; -- Basys3 100MHz clock
reset : in std_logic;
clk_out : out std_logic;
count : out std_logic_vector(2 downto 0) -- 3-bit counter
@barbarbar338
barbarbar338 / dff.vhdl
Last active April 28, 2025 20:08
D-flip-flop for Basys3 with reset - Positive-edge triggered
-- barbarbar338
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity dff is
Port (
clk : in std_logic;
reset : in std_logic;
d : in std_logic;
q : out std_logic
@barbarbar338
barbarbar338 / clock_divider.vhdl
Last active April 28, 2025 20:08
Clock divider for Basys3 - 100MegHz to 2Hz
-- barbarbar338
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity freq_divider is
Port (
clk_in : in std_logic; -- 100MHz clock input
reset : in std_logic;
clk_out : out std_logic -- 2Hz clock output
@barbarbar338
barbarbar338 / pendulum.cpp
Created April 12, 2025 10:26
Shows information about an ideal pendulum - Prepared for AGU EEE Coma Capsule Integrated Project#3
#include <iostream>
#include <cmath>
using namespace std;
const double pi = acos(0) * 2;
class Pendulum {
private:
double length;
@barbarbar338
barbarbar338 / student_grade_check.cpp
Created April 12, 2025 10:03
Checking how many questions students answered from a CSV table - Prepared for AGU EEE Coma Capsule Integrated Project#2
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
#include <map>
#include <algorithm>
using namespace std;
// Using pointers to pass the vector by reference
@barbarbar338
barbarbar338 / inverse.cpp
Last active April 20, 2025 13:16
Taking the Inverse of a Matrix Using Gauss-Jordan Method - Prepared for AGU EEE Coma Capsule Integrated Project#1
#include <iostream>
/*
used vectors instead of arrays.
It's easier to work with vectors
because of their dynamic size.
~ barbarbar338
*/
#include <vector>
@barbarbar338
barbarbar338 / plotter.ino
Last active February 22, 2025 19:27
Arduino UNO code used in AGU Digital System Design Capsule Project to plot clock output and calculate frequency
/*
You might need to change the plotter
history size to see everything cleaner.
Here is a good tutorial for this:
https://youtu.be/qrfpPuw2W3A
*/
const int analogPin = A0; // Clock output pin
const int threshold = 512; // Midpoint (~2.5V for a 5V signal)