Skip to content

Instantly share code, notes, and snippets.

View raulperula's full-sized avatar

Raúl Pérula Martínez raulperula

View GitHub Profile
grep -R "<string to find>" <path>
@raulperula
raulperula / show_services.py
Created October 4, 2016 16:56
Script to show current services running in ROS. Similar to get_published_topics() implemented function in rospy.
import rosgraph.masterapi
m = rosgraph.masterapi.Master('/my_node')
services = m.getSystemState()[2]
service_names = [x[0] for x in services]
print (service_names)
cat file.txt | grep -v "string_to_avoid"
catkin_make -DCATKIN_BLACKLIST_PACKAGES="ir_trans_drivers"
# create the ignore.txt file
echo "bin
build
lib
msg_gen
srv_gen
CMakeLists.txt.user
test_results
catkin
catkin_generated
# this is valid for images and PDF
identify -format '%[colorspace]' document_or_image.jpg
gs -dSAFER -dBATCH \
-dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \
-sColorConversionStrategy=CMYK \
-dProcessColorModel=/DeviceCMYK \
-sOutputFile=document_cmyk.pdf \
document_rgb.pdf
#!/bin/bash
DATE=$(date + "%Y-%m-%d_%H%M")
raspistill -vf -hf -o /home/pi/camera/$DATE.jpg
catkin_make -DCATKIN_WHITELIST_PACKAGES=""
/WINEPREFIX=~/.wine32 WINEARCH=win32 wine setup.exe/