Showing posts with label toolkits. Show all posts
Showing posts with label toolkits. Show all posts

Tuesday, December 10, 2019

Install brat on Ubuntu (Apache2)

Install brat

Install Apache2
Download and unzip the brat v1.3
Move the folder to /var/www/brat
In /var/www/brat run ‘./install’. Follow the instruction to set username, password and email.
In etc/apache2/sites-avialble/000-default.conf add









Alias /brat "/var/www/brat"
<Directory "/var/www/brat">
    Options +ExecCGI
    AddHandler cgi-script .cgi
    # AddHandler fastcgi-script fcgi
    AllowOverride Options Indexes FileInfo Limit
    AddType application/xhtml+xml .xhtml
    AddType font/ttf .ttf
</Directory>
Restart apache2:


sudo service apache2 reload

Enable FastCGI

Install fastcgi by running ‘sudo apt-get install libapache2-mod-fastcgi’
Change etc/apache2/sites-avialble/000-default.conf


 
# AddHandler cgi-script .cgi
AddHandler fastcgi-script fcgi

Saturday, December 7, 2019

How to delete all .svn in a folder

By | September 20, 2013


If you need to remove all .svn folders in a project, run


find . -name ".svn" -exec rm -rf {} ;
 
or more precisely, run


find . -type d -name '.svn' -print -exec rm -rf {} ;
 
The script starts from the current directory and searches recursively to the sub-folders. This script also works on other names by replacing “.svn”. But if the name is too general especially if you use the regular expression, you may end up by deleting a bunch of folders/files you don’t want to. A safer way is to run find first to verify all found folders/files are really what you intend to remove.

How to convert video using MEncoder


By | September 26, 2013 
 
 MEncoder is a free command line video decoding, encoding, and filtering tool. As a by-product of MPlayer, it can convert all formats that Mplayer can understand.
  1. install mencoder
    sudo apt-get install mencode
    
  2. avi → mp4
    mencoder 1.avi -o 1.mp4 -oac copy -ovc lavc -lavcopts vcodec=mpeg1video -of mpeg
    
    • o: output file name.
    • oac: audio codecs for encoding. copy does not reencode but just copy compressed frames.
    • ovc: video codecs for encoding. lavc means using one of libavcodec’s video codecs.
    • lavcopts: libavcodec’s video codecs. Here we choose MPEG-1 video.
    • of: output container formats. mpeg means MPEG-1 and MPEG-2 PS.
  3. mov → avi
    mencoder -oac mp3lame -ovc x264 1.mov -o 1.avi
    
    • oac: mp3lame means encoding to VBR, ABR or CBR MP3 with LAME.
    • ovc: x264 means using x264, MPEG-4 Advanced Video Coding (AVC), AKA H.264 codec.

Install Source Code Pro on Ubuntu

By | September 28, 2013


Source code pro is a free set of monospace fonts created by Adobe. It is very suitable for text editors and terminal windows. The fonts are also available on various Google Web Fonts.
  1. download: https://sourceforge.net/projects/sourcecodepro.adobe/files/
  2. unzip file
  3. mkdir -p ~/.fonts
  4. move OpenType fonts (.otf) or TrueType files (.ttf) to ~/.fonts
  5. sudo fc-cache