Skip to content

New revision of redmine-cmd released

February 27, 2016

Yesterday, I decided expend sometime in a little tool created for me one year and half ago. This tool was named redmine-cmd and, obviously, the purpose of this tool is the usage of the Redmine ticketing system directly from the console system but also auto-submit the time expended in each task automatically.

The tool was functional with Redmine <=1.2 until now but it didn’t implement all the API definition covered  by the latest versins of Redmine. The reason of that it was bacause the places where I was using this tool had not been upgraded to the latest version of Redmine for years. One of the consecuences of this was that many API/REST ending points was not be available for my tool in those early Redmine enviroments, therefore some relevant values related to a Redmine’s issue as the tracker id, the activity id or the issue status code wasn’t available to be obtained from the server causing, these restrictions,  weird things like the definition of  enumerators in the redmine-cmd configuration file with the same values that in the server.

 

redmine-cmd console example

redmine-cmd console example

But it’s a new time today, the time come down and the last Redmine with a version < 2.2 is not anymore  around me so,  yesterday, finally I decided end the integration with the Redmine API using the ending points required by my tool to get dinamically all the data required from the server:

The final implemantion is already available on PIP public repositories with MIT license to be used for everybody. The usage is quite trivial and the installation and setup steps are documented int the README file. Please, download and use it, any feedback will be welcome.

Extenal link: https://github.com/psaavedra/redmine-cmd

Pablo says: “welcome ess-pipe-de to my life!”

January 13, 2016

Recently, some guy suggests me the usage of spiped instance of “SSH -L” to generate secure and more robust tunnels in peers under my control. The father of the creature is Alex Polvi (https://twitter.com/polvi) which doesn’t looks like as the new guy in the class: CEO in CoreOs Inc., previously General Manager on Rackspace, Product Manager and Sysadmin for mozilla.org. So, you can feel free to trust on spiped the next time you wish a protected peer-to-peer communication between a pair of servers:

 

To set up an encrypted and authenticated pipe for sending email between two
systems (in the author's case, from many systems around the internet to his
central SMTP server, which then relays email to the rest of the world), one
might run

# dd if=/dev/urandom bs=32 count=1 of=keyfile
# spiped -d -s '[0.0.0.0]:8025' -t '[127.0.0.1]:25' -k keyfile

on a server and after copying keyfile to the local system, run

# spiped -e -s '[127.0.0.1]:25' -t $SERVERNAME:8025 -k keyfile

at which point mail delivered via localhost:25 on the local system will be
securely transmitted to port 25 on the server.

 

Suggested post: http://www.daemonology.net/blog/2012-08-30-protecting-sshd-using-spiped.html

Original repository in github: https://github.com/polvi/spiped

Using Gstreamer with OpenMax in a Raspberry Pi

November 14, 2014

This minipost shows a subgroup of commands tested in a Raspberry Pi to evaluate the possibilities of a usage of this hardware as a domestic TV Headend.

  • From UDP/TS source with video MPEG2 to another UDP multicast group transcoding the video
    stream with H264:gst-launch-1.0 -v  udpsrc uri=udp://239.123.123.3:1234 ! tsdemux ! queue ! mpegvideoparse ! omxmpeg2videodec ! videoconvert ! omxh264enc ! video/x-h264,stream-format=byte-stream,profile=high ! h264parse ! mpegtsmux ! udpsink host=239.123.124.3 port=1234 auto-multicast=true

    The Gstreamer pipeline doesn’t break/end but there is a bug in the h264parse: it sends not regularly the needed SPS / PPS information with it (http://www.raspberrypi.org/forums/viewtopic.php?f=70&t=59412). Then, resulting stream is only playable if you get the stream from the beginning.

  • From UDP/TS source with video MPEG2 and MP2 to another UDP multicast group transcoding the video stream with H264 and video with AAC:
    gst-launch-1.0 -v udpsrc uri=udp://239.123.123.1:1234 ! queue ! tsdemux name=dem \
    dem. ! queue ! mpegvideoparse ! mpeg2dec ! videoconvert ! omxh264enc control-rate=1 target-bitrate=1000000 ! video/x-h264,stream-format=byte-stream,profile=high ! h264parse config-interval=2 ! queue ! muxer. \
    dem. ! queue ! mpegaudioparse ! mpg123audiodec ! audioconvert ! faac ! queue ! muxer. \
    flvmux name=muxer ! queue ! rtmpsink location="rtmp://rtmp.server:1935/rtmp/test2 live=test2"

    The Gstreamer pipeline breaks for some unkknown reason.

  • From UDP/TS source with video MPEG2 to a RTMP server transcoding to H264:
    gst-launch-1.0 -v udpsrc uri=udp://239.123.123.1:1234 ! queue ! tsdemux name=dem \
    dem. ! queue ! mpegvideoparse ! mpeg2dec ! videoconvert ! omxh264enc control-rate=1 target-bitrate=1000000 ! video/x-h264,stream-format=byte-stream,profile=high ! h264parse config-interval=2 ! queue ! muxer. \
    flvmux name=muxer ! queue ! rtmpsink location="rtmp://rtmp.server:1935/rtmp/test2 live=test2"

    Works fine and smooth. Source is a MPEG/TS SD channel.

  • From UDP/TS source with audio MP2 to a RTMP server transcoding audio channel to AAC:
    gst-launch-1.0 -v udpsrc uri=udp://239.123.123.1:1234 ! queue ! tsdemux name=dem \
    dem. ! queue ! mpegaudioparse ! mpg123audiodec ! audioconvert ! faac ! queue ! muxer. \
    flvmux name=muxer ! queue ! rtmpsink location="rtmp://rtmp.server:1935/rtmp/test2 live=test2"

    Works fine and smooth.

Hide the VLC cone icon in the browser-plugin-vlc for Linux (Mozilla or Webkit) (Debian way)

November 7, 2014
vlc

VideoLAN’s fu***ng cone

The next instructions describes how to proceed to hide the VLC cone icon in the VLC plugin for Web browsers. I think this tip can be useful for another ninjas in so far as there is not a lot of information on Internet which describes this. Instructions are based on the Debian way and use the Debian/DPKG tools but I guess that the example is far enough explicit to be extrapolated to other environments.

Requirements:

  • You need to install all the build-dependences for the browser-plugin-vlc before execute dpkg-buildpackage -rfakeroot

Steps:

  • apt-get source browser-plugin-vlc
  • cd npapi-vlc-2.0.0/
  • edit npapi/vlcplugin_gtk.cp and replace the code as follows:
    --- npapi-vlc-2.0.0.orig/npapi/vlcplugin_gtk.cpp
    +++ npapi-vlc-2.0.0/npapi/vlcplugin_gtk.cpp
    @@ -46,12 +46,13 @@ VlcPluginGtk::VlcPluginGtk(NPP instance,
         vol_slider_timeout_id(0)
     {
         memset(&video_xwindow, 0, sizeof(Window));
    -    GtkIconTheme *icon_theme = gtk_icon_theme_get_default();
    -    cone_icon = gdk_pixbuf_copy(gtk_icon_theme_load_icon(
    -                    icon_theme, "vlc", 128, GTK_ICON_LOOKUP_FORCE_SIZE, NULL));
    -    if (!cone_icon) {
    -        fprintf(stderr, "WARNING: could not load VLC icon\n");
    -    }
    +    cone_icon = NULL;
     }
     
     VlcPluginGtk::~VlcPluginGtk()
    
  • dpkg-source –commit
  • dpkg-buildpackage -rfakeroot
  • cd ../
  • ls browser-plugin-vlc_2.0.0-2_amd64.deb

Installation:

  • dpkg -i browser-plugin-vlc_2.0.0-2_amd64.deb

House in San Sadurniño

October 12, 2014

My home on the father’s family side. The site is currently in a state of abandonment. The nature, fine, keeps the place with an autumnal everlasting charm.

Debootstrap – all steps

April 13, 2012

Installing Debian GNU/Linux from another Unix/Linux System

This article will show how to install a Debian GNU/Linux on a existing
Linux server which is up and running.

A more detailed information about this stuff you will be able to get
on http://www.debian.org/releases/stable/i386/apds03.html

Following steps should be followed in order.

Getting debootsrap:

cd /root
mkdir tmp
cd tmp
wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.26+squeeze1_all.deb
ar -x debootstrap_1.0.26+squeeze1_all.debar -x debootstrap_1.0.26+squeeze1_all.deb
cd /
zcat /root/tmp/data.tar.gz | tar xv

Making the base directory for the chroot enviroment:

mkdir /mnt/debian

Mounting the target partition (we are assuming target partition is a Linux
metadevice):

mount /dev/md1 /mnt/debian/
/usr/sbin/debootstrap --arch amd64 squeeze /mnt/debian/ http://ftp.us.debian.org/debian

Copying the reusable information:

cp /etc/hosts /mnt/debian/etc/
cp /etc/hostname /mnt/debian/etc/
cp /etc/network/intefaces /mnt/debian/etc/network/
cp /etc/fstab /mnt/debian/etc/

/dev/md1 / ext4 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /tmp tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0

cp /etc/mdadm.conf /mnt/debian/etc/

MAILADDR root
AUTO +imsm +1.x -all
DEVICE /dev/sda* /dev/sdb*
ARRAY /dev/md1 devices=/dev/sda1,/dev/sdb1
ARRAY /dev/md3 devices=/dev/sda3,/dev/sdb3

cp /etc/inittab /mnt/debian/etc/

# getty in a serial console:
T0:2345:respawn:/sbin/getty -L ttyS0 57600 vt100

Cheking if serial console port is in seccuretty file:

vim /mnt/debian/etc/securetty
# ttyS0 must be listen into this file

Adjusting the source.list

vim /mnt/debian/etc/apt/sources.list

Mounting needed resources:

mount -t proc proc /mnt/debian/proc
mount -o bind /dev/ /mnt/debian/dev/

Entering in the chroot enviroment:

LANG=C chroot /mnt/debian/ /bin/bash

Mounting extra resources needed

mount /dev/pts/
mount /sys

Changing password. We usually  forget this step and due to this fact then we can
not login into the server.

passwd root

Installing needed packages (kernel, tools, modeules required, bootloader):

apt-get install vim ssh lvm2 mdadm bridge-utils
apt-cache search linux.image
apt-get install linux-image...
apt-get install grub2

Configuring grub

vim /etc/default/grub
# set console output on grub

update-grub

Reviewing all settings:

vim /boot/grub/grub.cfg
vim /etc/inittab
vim /etc/fstab
vim /etc/network/interfaces

Finally, exit to the chroot enviroment and execute the reboot command.

… and Good luck !!!

x11vnc: a VNC server for real X displays

March 28, 2012

In localhost:
localhost$ ssh <<remote_host_ip>>

In remotehost:
remotehost$ export DISPLAY=:0
remotehost$ x11vnc

In localhost:
localhost$ vinagre <<remote_host_ip>>

Follow

Get every new post delivered to your Inbox.

Join 80 other followers