Skip to content

Instantly share code, notes, and snippets.

View ekaktusz's full-sized avatar
🐇
doing code brrr

Csaba Ekart ekaktusz

🐇
doing code brrr
View GitHub Profile
@ekaktusz
ekaktusz / config.toml
Last active July 5, 2024 12:26
helix config
theme = "gruvbox"
[editor]
#line-number = "relative"
mouse = true
auto-completion = true
completion-timeout = 5
completion-trigger-len = 1
true-color = true
bufferline = "always"
@jakubtomsu
jakubtomsu / collision_3d.odin
Last active October 31, 2025 16:20
Simple raylib example of 3d FPS player movement with triangle collision
package main
import "core:fmt"
import "core:math"
import "core:math/linalg"
import rl "vendor:raylib"
main :: proc() {
rl.SetConfigFlags({.VSYNC_HINT, .WINDOW_RESIZABLE, .MSAA_4X_HINT})
rl.InitWindow(800, 600, "collision")
@ekaktusz
ekaktusz / ubuntu_sim_ros_noetic.sh
Last active December 21, 2022 06:29
Updated the official /ubuntu_sim_ros_melodic.sh script from PX4 Devguide to support Ubuntu 20.04 Focal Fossa with ROS Noetic Ninjemys based on https://github.com/PX4/Devguide/pull/1044
#!/bin/bash
## Bash script for setting up ROS Noetic (with Gazebo 11) development environment for PX4 on Ubuntu LTS (20.04).
## It installs the common dependencies for all targets (including Qt Creator)
##
## Installs:
## - Common dependencies libraries and tools as defined in `ubuntu_sim_common_deps.sh`
## - ROS Noetic (including Gazebo11)
## - MAVROS
@mbinna
mbinna / effective_modern_cmake.md
Last active January 17, 2026 10:42
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@dxlbnl
dxlbnl / kaboo.md
Last active October 9, 2025 13:59
Kaboo - Rules [the best game.]

Kaboo

Kaboo is played with a standard card deck. It can be played with 2 to 8 players with a single deck.

Card values

  • Ace = 1
  • 2-10 = 2-10
  • Jack, Queen, King = 10
  • Red King = -1 (both of them)
@wojteklu
wojteklu / clean_code.md
Last active January 19, 2026 05:38
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@MarioLiebisch
MarioLiebisch / parallaxShader.cpp
Created July 17, 2016 19:17
SFML Example to render a repeated parallax background using a vertex shader for movement.
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "Parallax Example",
sf::Style::Titlebar | sf::Style::Close);
window.setVerticalSyncEnabled(true);
sf::Texture texture;
if (!texture.loadFromFile("resources/background.jpg"))
@DominicBreuker
DominicBreuker / gd_simple.py
Created June 16, 2016 16:30
Simple example of gradient descent in tensorflow
import tensorflow as tf
x = tf.Variable(2, name='x', dtype=tf.float32)
log_x = tf.log(x)
log_x_squared = tf.square(log_x)
optimizer = tf.train.GradientDescentOptimizer(0.5)
train = optimizer.minimize(log_x_squared)
init = tf.initialize_all_variables()
@Zearin
Zearin / python_decorator_guide.md
Last active January 12, 2026 16:30
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@amilamanoj
amilamanoj / WebSocket Server
Created June 22, 2013 17:29
Secure WebSocket Server with Jetty 9
package org.amila.sample.websocket.server;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.server.*;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.util.resource.FileResource;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.websocket.server.WebSocketHandler;