This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Removes all tfs except the one that has 'base_footprint' as child frame id | |
rosbag filter old.bag new.bag "topic != '/tf' or (len(m.transforms)>0 and m.transforms[0].child_frame_id=='base_footprint')" | |
#Same as above but limiting other topics to '/odom' and '/scan' | |
rosbag filter old.bag new.bag "topic == '/odom' or topic == '/scan' or (topic == '/tf' and len(m.transforms)>0 and m.transforms[0].child_frame_id=='imu_link')" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Convert the format of one image | |
convert source.pgm target.png | |
#Convert all images format of one type into another | |
# e.g. png is the target format | |
# e.g. all pgm images starting with "source" are converted | |
mogrify -format png source*.pgm | |
#Convert multiple images to one animated image | |
# e.g. takes all pgm images in the folder to create one animated gif. Verify that the images are numbered in ascending order. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap -p 25 -sC yourDomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This can be quite useful to run some process on the server, | |
# as it will not listen to the hangup signal of the terminal | |
# and will not terminate the process, if you close the terminal. | |
# In addition all output is appended in the log file | |
nohup /usr/bin/python3.4 /abspath/someFile.py 2>&1 | /usr/bin/tee -a /abspath/log.txt & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quickly create an android app for IoT : | |
https://www.blynk.cc/ | |
#ROS stack and library for roomba and create: | |
https://github.com/AutonomyLab/create_autonomy | |
https://github.com/AutonomyLab/libcreate/blob/master/include/create/types.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace OLD with the string you want to replace, and NEW with the string you want to insert | |
find ./ -type f -exec sed -i -e 's/OLD:/NEW:/g' {} \; | |
grep -rl 'OLD' . | xargs sed -i 's/OLD/NEW/g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Example: | |
#get some info with: | |
udevadm info -a -n /dev/ttyUSB0 | grep serial | |
udevadm info -a -n /dev/ttyUSB0 | grep idProduct | |
udevadm info -a -n /dev/ttyUSB0 | grep idVendor | |
#or | |
udevadm info -a -n /dev/ttyUSB0 | grep -E 'idVendor|idProduct|serial' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import paho.mqtt.client as mqtt | |
import RPi.GPIO as GPIO | |
import time | |
import signal | |
TOPIC_1= "lab_switch" | |
HOST="localhost" | |
USER="openhab" | |
class MQTTGPIO(): | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ Plugin SD card that contains the Raspbian OS into your computer | |
+ Find the partition that is called "boot" | |
+ Create a file there called ssh | |
REMARK: Only works for raspbian! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Splits the PDF in single pages PDFs which are saved in a subfolder called extracted and the page name. | |
# If the pages does already exist, it will increment the page number by one, until the filename is not occupied. | |
#sudo apt-get install pdftk | |
#chmod +x split_pdf.bash | |
#./split_pdf.bash source.pdf | |
PDFFILE=$1 | |
echo "File: "$PDFFILE |
OlderNewer