Skip to content

Instantly share code, notes, and snippets.

View zulhafiz-zulkifli's full-sized avatar
🐈
trying to do better

Zulhafiz Zulkifli zulhafiz-zulkifli

🐈
trying to do better
View GitHub Profile
@devmaars
devmaars / Termux SSH Tutorial.md
Created April 5, 2024 15:05
This guide will show you how to set up an ssh server on your phone using Termux and connect to it from your computer. This is useful if you want to access your phone's files or run commands on your phone from your computer.

How to ssh to termux the right way

Termux

Requirements

  • Termux (From F-Droid)
  • ADB (Android Debug Bridge)
  • USB Cable (Wireless connection is also possible but it's slower)
@nightduck
nightduck / image_converter.cpp
Created May 22, 2020 18:56
cv_bridge demo in ROS2
#include <stdlib.h>
#include <functional>
#include "rclcpp/rclcpp.hpp"
#include "image_transport/image_transport.h"
#include <cv_bridge/cv_bridge.h>
#include "sensor_msgs/image_encodings.hpp"
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
@chapulina
chapulina / colcon_cheatsheet.md
Last active February 5, 2026 16:23
Colcon cheatsheet

Only one package:

--packages-select <package>

Packages with regex:

--packages-select-regex <regex>

Verbose, print to console:

@Fabien-B
Fabien-B / ust-05ln.py
Created June 18, 2018 22:55
getting UST-05LN data over serial USB.
from serial import Serial
import time
from collections import namedtuple
class UST:
Command = namedtuple('Command',['command', 'answer_expected', 'answer'])
START_RANGING = Command('#GT15466', False, '')
STOP_RANGING = Command('#ST5297', True, '#ST00A845')
@vilkoz
vilkoz / setup_http_server_on_android_with_termux.md
Last active November 17, 2025 02:22
setup http server on android with termux

Setting up http server on android with termux

Setting SSH server

To be able to make all procedures without pain you should have physical keyboard or just install ssh server and connect to your device shell from computer.

Folow this guide to setup ssh server.

Installing needed stuff

@wojteklu
wojteklu / clean_code.md
Last active May 3, 2026 10:13
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

@graydon
graydon / country-bounding-boxes.py
Created April 23, 2014 00:03
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),