Skip to content

Instantly share code, notes, and snippets.

View msadowski's full-sized avatar

Mateusz Sadowski msadowski

View GitHub Profile
@msadowski
msadowski / gist:a9f12fb40e89f842f5b23ae6a01623f4
Created March 19, 2020 09:42
Setting an external machine on lan as a git remote
git remote add mat git://192.168.1.34/home/mat/catkin_ws/src # 192.168.1.34 is the IP of my laptop
git fetch mat # Make sure you can talk to the remote
ssh-keygen -t rsa # Generate an SSH key pair, use default settings
ssh-copy-id -i id_rsa.pub mat@192.168.1.34 # copy the public key to my laptop
# Now you can use the repo as you normally would, making sure you specify the origin as "mat" when pushing/pulling
#!/usr/bin/env python
import rospy
import tf2_ros
import tf2_msgs.msg
import geometry_msgs.msg
from math import pi
from tf.transformations import quaternion_from_euler
class FixedTFBroadcaster:
ls /dev/video*
var ros = new ROSLIB.Ros({
url : 'ws://localhost:9090'
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="http://static.robotwebtools.org/roslibjs/current/roslib.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/nipplejs/0.7.3/nipplejs.js"></script>
<script type="text/javascript" type="text/javascript">
@msadowski
msadowski / .tmux.conf
Created November 27, 2018 15:59
tmux conf
# Synchronize panes binding
bind-key e set-window-option synchronize-panes
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
# Synchronize panes binding
bind-key e set-window-option synchronize-panes
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
KeyboardIntercept keyboardIntercept = new KeyboardIntercept();
keyboardIntercept.KeyIntercepted += new EventHandler<KeyEventArgs>(Form_KeyDown);
using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace BejeweledBot
{
/// <summary>
/// Based on https://blogs.msdn.microsoft.com/toub/2006/05/03/low-level-keyboard-hook-in-c/
/// </summary>
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace BejeweledBot
{
class VirtualMouse
{
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo);