Skip to content

Instantly share code, notes, and snippets.

View liamplm's full-sized avatar
🎯

Pouya Liaghat mehr liamplm

🎯
View GitHub Profile
@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active April 18, 2023 06:01
SSH Tunnel as systemd service

${LOCAL_ADDR IP:PORT}

یعنی سرور ایرانتون و پورت داخلی که میخواهید روش ساکس داشته باشید و باید با این جایگزین بشود.

مثال:

10.10.10.10:9090

و قسمت پایین هم یوزر سرور خارجتون و آدرس IP سرور خارجیتونه که باید جایگزین کنید تو خط 7 فایل ssh-tunnel-as-systemd.sh

@cmer
cmer / haproxy.cfg
Last active April 15, 2024 09:54
Simple, no bullshit TCP port forwarding using HAProxy
listen l1
bind 0.0.0.0:443
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1 host.example.com:9443
@wojteklu
wojteklu / clean_code.md
Last active June 29, 2024 08:22
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

@atotto
atotto / ros_odometry_publisher_example.py
Last active November 8, 2023 10:15
Publishing Odometry Information over ROS (python)
#!/usr/bin/env python
import math
from math import sin, cos, pi
import rospy
import tf
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3
@ValeriiVasin
ValeriiVasin / color.js
Created December 11, 2012 19:25
Colorized output in nodejs
var color, i;
// Notice: octal literals are not allowed in strict mode.
function colorize(color, output) {
return ['\033[', color, 'm', output, '\033[0m'].join('');
}
for (i = 0; i < 100; i += 1) {
color = Math.random() > 0.9 ? 91 : 92; // 91 - red, 92 - green
process.stdout.write( colorize(color, '●') );