Git migrate repository
Posted by hvera1981 in Uncategorized on October 4, 2012
git remote add new_repo_name new_repo_url
git push new_repo_name master
git remote rm origin
Git, create new repository from subfolder
git clone --no-hardlinks repo_original new_repo;
cd new_repo
git filter-branch --subdirectory-filter subdir/you/want
git remote rm origin
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git repack -ad
Reboot Linux box after a kernel panic
To reboot 10 seconds after a kernel panic
vi /etc/sysctl.conf
kernel.panic = 10
or
echo 10 > /proc/sys/kernel/panic
Motorola Xoom Power / turn on problem
Posted by hvera1981 in Uncategorized on May 13, 2012
Press power button and Vol Up at same time to solve that. Make sure you have enough battery
Converting JVT NAL sequence, H.264 video
Posted by hvera1981 in Uncategorized on May 2, 2012
ffmpeg -vcodec h264 -i 20120502_184627_65535.mp4 -vcodec copy -acodec copy 20120502_184627_65535_.mp4
Cool AT coomands
Posted by hvera1981 in Uncategorized on April 18, 2012
/*Retrieve ICCID*/
AT+CRSM=176,12258,0,0,10
+CRSM: 144,0,”98555063930031910316″
In this case ICCID is
89550536390013193061
/*Retrieve IMEI*/
Ubuntu Waiting up to 60 seconds more for network …
Posted by hvera1981 in Uncategorized on March 7, 2012
Ubuntu loves to mess with standards.
This problem occurs when you (manually) add more interfaces in /etc/network/interfaces
To avoid the 60 sec delay I know 2 ways:
- Use network manager
or
- Edit /etc/init/failsafe.conf and comment the sleeps
Recording Desktop activity with ffmpeg
Posted by hvera1981 in Uncategorized on February 17, 2012
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq out.mpg 2> /dev/null
Edit incorrect commit
git commit --amend
Changing old commits:
git rebase --interactive $HASH
Compile OpenCV
Install packages:
sudo apt-get install build-essential libgtk2.0-dev libjpeg62-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev
Download FFmpeg:
cd /usr/local/src
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xvfj ffmpeg-snapshot.tar.bz2
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libxvid --enable-x11grab --enable-swscale --enable-shared
make
make install
ldconfig
cd /usr/local/src
wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.3.1/OpenCV-2.3.1a.tar.bz2/
tar xvfj OpenCV-2.3.1a.tar.bz2
cd OpenCV-2.3.1
cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=OFF -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON .
make
make install