Skip to content

Instantly share code, notes, and snippets.

View ozgurgulsuna's full-sized avatar
💭
traveling at the speed of light

Ozgur Gulsuna ozgurgulsuna

💭
traveling at the speed of light
View GitHub Profile
@ozgurgulsuna
ozgurgulsuna / PWL-for-SPWM.m
Last active December 13, 2023 10:11
SPWM PWL Generator for LTspice
% #########################################################################
%
% Creating PWL Files for Sinusoidal PWM to use it in LTspice
%
% This script generates PWM signals for high side and low side to source
% in LTspice. Its inputs consist of rise time, fall time, fundamental
% frequency, switching frequency, deadtime, modulation limit, Vdd, Vcc.
%
% Its features are symmetric deadtime, multi-phase generation with
% different phase shifts, adjustable rise time, fall time, deadband,
@ozgurgulsuna
ozgurgulsuna / GhShaderNodesIntroduction.md
Last active May 21, 2024 16:04
This is a basic introduction on procedurally controlled material nodes for grasshopper with GhShaderNodes.

Introduction to Material Nodes with
GhShaderNodes

What are material nodes and is it possible to control the materials using grasshopper definitons?

Material nodes are type of nodes that produce a material definition when combined. There are many types of blocks in this node system, there are ones for combining textures, colors, for blending materials and etc.

fig-1

It helps us not only to create textures from scratch but control them using our parameters within grasshopper.

'''
Written by A.B.Koku & I.Ozcil
Jan 28 2022
'''
# start with imports
import numpy as np
from skimage import io
import random
import matplotlib.pyplot as plt
@ozgurgulsuna
ozgurgulsuna / InitPicoArchLinux.bash
Last active May 10, 2022 20:11
Raspberry Pi Pico C/C++ Programming on Manjaro/Arch Linux Setup and No-Boot-Button Guide
# Start with installing dependencies
# Manual insallation might be required for some refer to https://dev.to/nabbisen/installing-aur-packages-bdf
sudo pacman -Sy minicom openocd cmake arm-none-eabi-gcc arm-none-eabi-newlib gcc
# clone all the base repos in a dependency folder
git clone https://github.com/raspberrypi/pico-sdk.git
git clone https://github.com/raspberrypi/pico-examples.git
git clone https://github.com/raspberrypi/pico-extras.git
git clone https://github.com/raspberrypi/pico-playground.git
@ozgurgulsuna
ozgurgulsuna / rdp_fixes.md
Last active October 6, 2024 18:52
xrdp , rdesktop, x session, problem, solution

Common Problems and Solutions with RDP

  • Problem #1 : XgetWindowProperty Failed

Observed with linux machine trying to connect to another linux machine with xrdp installed.

[ozgur@ozgur ~]$ rdesktop -u <USERNAME> -p <PASSWORD> <IP>
Connection established using plain RDP.
Clipboard(error): xclip_handle_SelectionNotify(), XGetWindowProperty failed
Clipboard(error): xclip_handle_SelectionNotify(), unable to find a textual target to satisfy RDP clipboard text request
Clipboard(error): xclip_handle_SelectionNotify(), XGetWindowProperty failed
@ozgurgulsuna
ozgurgulsuna / Remote_Program_TM4C123G_from_Linux.md
Last active October 26, 2022 08:41
Texas Instruments, TM4C123G, LaunchPad, Linux, USB/IP, USB Redirection, RDP.

Remote Program TM4C123
Ozgur Gulsuna

Middle East Technical University 2022
@ozgurgulsuna
ozgurgulsuna / markdown-magic.md
Last active August 5, 2022 10:53
Github flavored markdown and html snippets

Introduction
Ozgur Gulsuna

/////////////////////////////////////////////////////////
@ozgurgulsuna
ozgurgulsuna / CustomColorbar.m
Last active August 12, 2022 16:38
matlab, colorbar, colormap
%%
clc
clear ;
close all
%%
figure;
set(gcf,'Position',[0 0 1000 500]);
set(0,'defaulttextinterpreter','latex');
set(gca,'TickLabelInterpreter','latex') ;
%%
%%
clc
clear all
%%
a = imread('C:\Users\ozgur\Desktop\sxs.jpg');
imshow(a);
[RGBdata, map, alpha] = imread('C:\Users\ozgur\Desktop\sxs.jpg', 'jpg');
%% Filter out white