Skip to content

Instantly share code, notes, and snippets.

View omeredemen's full-sized avatar

Omer Faruk Edemen omeredemen

  • https://www.emselektronik.com/
  • Ankara, Turkey
  • 04:21 (UTC +03:00)
View GitHub Profile
@omeredemen
omeredemen / ping_range.sh
Created January 29, 2025 10:43
this file pings ip adresses 10.42.0.0 to 10.42.0.255
#!/bin/bash
# Loop through IP addresses 10.42.0.0 to 10.42.0.255
for i in {0..255}; do
ip="10.42.0.$i"
echo "Pinging $ip..."
ping -c 1 -W 1 "$ip" > /dev/null 2>&1
if [ $? -eq 0 ]; then
@omeredemen
omeredemen / 50-cloud-init.yaml
Last active November 20, 2024 16:34
etc/netplan yaml file on rpi
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
# this part set a wifi access-points
version: 2
wifis:
@omeredemen
omeredemen / gpio.txt
Created January 5, 2024 09:05
gpio manupilate
echo 149 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio149/direction
echo 0 > /sys/class/gpio/gpio149/value
echo 149 > /sys/class/gpio/unexport
@omeredemen
omeredemen / ros2_pcl.txt
Last active January 5, 2024 05:33
install ros2 pcl on jetson nano
# these testes on jetson nano ubuntu 18.04 and L4T 4.6.2
sudo apt install libpcl-dev # some packages should be installed on jetson bc of dependencies
sudo apt remove libpcl-* --purge
# Download pcl-pcl-1.10.1.tar.gz from
# https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.10.1
# to the jetson and move this file to ~/.local/lib/
cd ~/.local/lib
tar xvf pcl-pcl-1.10.1.tar.gz
cd pcl-pcl-1.10.1 && mkdir build && cd build
@omeredemen
omeredemen / galactic_install.sh
Last active August 16, 2023 06:16
this script is used to build ros2 galactic from source on jetson nano
# this script is used to build ros2 galactic from source on jetson nano
# it tested on jetpack 4.6.2
# before start be sure that you have correct cmake version if not please refer
# https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line/865294#865294
# to update cmake
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
@omeredemen
omeredemen / clone_gitlab_group
Last active July 21, 2023 06:03
this script clones gitlab groups with group id
#!/bin/bash
ACCESS_TOKEN=<YOUR_GITLAB_ACCESS_TOKEN>
GROUP_ID=<GROUP_ID>
DESTINATION_PATH=/path/to/clone
# clones where this bash script is located
# curl --header "PRIVATE-TOKEN: $ACCESS_TOKEN" "https://gitlab.com/api/v4/groups/$GROUP_ID/projects" | jq -r '.[].http_url_to_repo' | xargs -n 1 git clone
here is a service file to autostart ros2 node. you can copy this in /etc/systemd/system name by ros2_talker.service
[Unit]
Description=ros2 talker controller test
[Service]
Environment="ROS_DOMAIN_ID=6"
Environment="HOME=root"
ExecStart=/usr/bin/bash /home/omer/talker.sh