Skip to content

Instantly share code, notes, and snippets.

View iftahnaf's full-sized avatar
🤖

Iftach Naftaly iftahnaf

🤖
View GitHub Profile
@armornick
armornick / openicon.c
Created August 23, 2012 08:47
Draw an Image with SDL2
#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#define WIDTH 800
#define HEIGHT 600
#define IMG_PATH "exit.png"
int main (int argc, char *argv[]) {
#!/usr/bin/env python
import os
import sys
import argparse
import logging
import numpy
from planetaryimage.pds3image import PDS3Image
from struct import pack, unpack
@0xjac
0xjac / private_fork.md
Last active September 18, 2025 17:29
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@hostilefork
hostilefork / listener.c
Last active August 26, 2025 08:22
Simple listener and sender for UDP multicast
//
// Simple listener.c program for UDP multicast
//
// Adapted from:
// http://ntrg.cs.tcd.ie/undergrad/4ba2/multicast/antony/example.html
//
// Changes:
// * Compiles for Windows as well as Linux
// * Takes the port and group on the command line
//
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active September 18, 2025 14:01
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@cyberang3l
cyberang3l / How to setup VirtualGL and TurboVNC on Ubuntu.md
Last active August 22, 2025 06:33
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding
@Kukanani
Kukanani / generate_checkerboard.py
Last active August 12, 2025 03:32
A script to generate a gazebo checkerboard. I built this while interning at Diligent Robotics in Summer 2018. The company is awesome, check them out at diligentrobots.com!
#!/usr/bin/env python
#
# Copyright (c) Diligent Robotics, 2018
# Copyright (c) Adam Allevato, 2018
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
@JADC362
JADC362 / ROS2DebugVSCode.md
Last active August 26, 2025 13:51
Debug ROS2 C++ node on VSCode (Ubuntu)

Debug ROS2 C++ node on VSCode (Ubuntu)

Description

This is a small tutorial on how to debug a ROS2 C++ node usign VSCode.

Requeriments

This implementation was done using:

@rfzeg
rfzeg / ros2_gazebo_and_urdf_robot.launch.py
Last active September 9, 2023 09:00
ROS2 launch Gazebo and spawn URDF robot using Execute Process
"""Launch Gazebo server and client with command line arguments."""
"""Spawn robot from URDF file."""
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import ExecuteProcess
from launch.substitutions import LaunchConfiguration
def generate_launch_description():
@eugeneyan
eugeneyan / mandelbrot-mojo.md
Last active April 4, 2024 15:52
Benchmarking Mojo vs. Python on Mandelbrot sets

Mandelbrot in Mojo with Python plots

Not only Mojo is great for writing high-performance code, but it also allows us to leverage huge Python ecosystem of libraries and tools. With seamless Python interoperability, Mojo can use Python for what it's good at, especially GUIs, without sacrificing performance in critical code. Let's take the classic Mandelbrot set algorithm and implement it in Mojo.

We'll introduce a Complex type and use it in our implementation.

Mandelbrot in python