Archive

Posts Tagged ‘tips and tricks’

simplescreenrecorder

September 24, 2017 Leave a comment

Problem
Under Linux you want to do some screen capturing. For instance, you want to do some tutorial videos.

Solution
I used gtk-RecordMyDesktop for a long time, but my current favorite is simplescreenrecorder. With gtk-RecordMyDesktop I could only save in .ogv format that I had to convert to .mp4 with ffmpeg. simplescreenrecorder can save directly in mp4 format.

Adobe Premiere Pro CS6
For editing my videos, I started to use Adobe Premiere Pro CS6. First, I asked my friends, and most of them suggested this. Second, I found some good and detailed tutorial videos for this software. I’m a newbie in video editing, so I needed some tutorials that showed everything step by step.

However, in Premiere Pro I ran into a problem. You need to import a video file and pull it to the timeline if you want to edit it. However, when I pulled an mp4 file, the audio track didn’t appear on the timeline. I had a workaround solution: from my .mp4 I extracted the audio in .wav format (with ffmpeg), and pulled it to the audio track. Strangely, the audio track was often a little bit shorter than the video track. But it was just annoying, it didn’t cause a problem.

So I tried some other screen capturing tools next to gtk-RecordMyDesktop, and that’s how I found simplescreenrecorder. After several trial and errors, I figured out why the audio track was missing. Whether the audio track appears or not depends on the audio codec! If you save the audio in AAC format, then Premiere Pro will like it and the audio track will appear when you pull such an .mp4 on the timeline. The good news is that you can select in simplescreenrecorder what audio codec you want to use!

Screenshots
Here are some screenshots of my simplescreenrecorder setup:

Alternatives
For some more screen capturing tools, see this post: 5 Best Screen Capture Tools for Linux.

Advertisements

a new range of shortcuts with the Hyper key

February 9, 2017 Leave a comment

On the YouTube channel of gotbletu I found a very nice trick (video). It explains how to replace the Caps Lock with the so-called Hyper key. And why? Because Caps Lock is pretty useless and you cannot use it for shortcuts. But if you tell the system that at the place of Caps Lock there is another key, namely the Hyper key, then you can use a new range of shortcuts.

You can find my .Xmodmap file here. Just put it in your HOME folder and upon the next reboot it’ll be activated automatically. To activate it without a reboot, use the command “xmodmap ~/.Xmodmap“.

Then, under Manjaro (XFCE), go to the Start menu, start typing “keyboard”, and open the Keyboard application. Go to the “Application Shortcuts” tab and add some new shortcuts. This time, when you press Caps Lock, it’ll be recognized as the Hyper key. I added these:

Hyper + g    gedit
Hyper + k    konsole
Hyper + f    file browser (thunar)

Update (20170416)
Under Manjaro I had to create the .Xmodmap file and it is read automatically at each boot. However, under Ubuntu it’s not the case. I tried several methods and here is what worked for me: add “xmodmap ~/.Xmodmap” to the end of your ~/.bashrc file. Now, when you open a terminal, it’ll be activated for sure.

Music video

And if Hyper Hyper, then Scooter, of course:

loop a youtube video

January 28, 2017 Leave a comment

Problem
You find an awesome music video and you want to play it in an infinite loop.

Solution
You need to re-format the youtube URL a bit. Sample:

Input: https://www.youtube.com/watch?v=VIDEO_ID

Output: http://www.youtube.com/v/VIDEO_ID?version=3&loop=1&playlist=VIDEO_ID

Concrete example: input, output.

Tip from here.

listen to Pandora Radio, even if you are not a US citizen

April 21, 2016 Leave a comment

Problem
If you are a peasant like me living outside of the US but you still want to listen to Pandora Radio, which is only available in the center of world (USA), then what can you do?

Solution
There is a very simple solution now. Opera offers free VPN, built directly in the browser. You can choose between German, Canadian or American VPNs. Currently this feature is only available in the development version of Opera. So here are the steps:

  1. install Opera (development version)
  2. install Flash player for Opera (Pandora is a Flash-based website)
  3. visit pandora.com just to see that you are kicked out
  4. enable VPN: with Alt+P you can access the Settings, go to Privacy & security, then enable VPN
  5. Open an arbitrary site. On the left side of the URL bar you’ll see that VPN is activated. Click on it and select United States.
  6. Visit pandora.com again. Strangely, you are let in this time…

turn off annoying YouTube annotations

August 9, 2015 Leave a comment

Problem
YouTube annotations are driving you crazy.

Solution
Turn ’em off for good. Follow these simple steps: http://www.businessinsider.com/turn-off-youtube-annotations-for-good-2014-8 .

Categories: tips Tags: , ,

Speed up Firefox page load by 44%

Details here.

In short:

  1. about:config
  2. privacy.trackingprotection.enabled -> true

Vim tricks by Damian Conway

December 13, 2013 Leave a comment

At reddit I found an interesting talk given by Damian Conway. In this talk he shares some cool vim tricks.

The assets to the presentation are available here: Instantly_Better_Vim_2013.tar.gz

I found the following tips particularly interesting.

"====[ Make the 81st column stand out ]====================

"    " EITHER the entire 81st column, full-screen...
"    highlight ColorColumn ctermbg=magenta
"    set colorcolumn=81

    " OR ELSE just the 81st column of wide lines...
    highlight ColorColumn ctermbg=magenta
    call matchadd('ColorColumn', '\%81v', 100)

"=====[ Highlight matches when jumping to next ]=============

    " This rewires n and N to do the highlighing...
    nnoremap <silent> n   n:call HLNext(0.4)<cr>
    nnoremap <silent> N   N:call HLNext(0.4)<cr>

    " OR ELSE ring the match in red...
    function! HLNext (blinktime)
        highlight RedOnRed ctermfg=red ctermbg=red
        let [bufnum, lnum, col, off] = getpos('.')
        let matchlen = strlen(matchstr(strpart(getline('.'),col-1),@/))
        echo matchlen
        let ring_pat = (lnum > 1 ? '\%'.(lnum-1).'l\%>'.max([col-4,1]) .'v\%<'.(col+matchlen+3).'v.\|' : '')
                \ . '\%'.lnum.'l\%>'.max([col-4,1]) .'v\%<'.col.'v.'
                \ . '\|'
                \ . '\%'.lnum.'l\%>'.max([col+matchlen-1,1]) .'v\%<'.(col+matchlen+3).'v.'
                \ . '\|'
                \ . '\%'.(lnum+1).'l\%>'.max([col-4,1]) .'v\%<'.(col+matchlen+3).'v.'
        let ring = matchadd('RedOnRed', ring_pat, 101)
        redraw
        exec 'sleep ' . float2nr(a:blinktime * 1000) . 'm'
        call matchdelete(ring)
        redraw
    endfunction

"====[ Make tabs, trailing whitespace, and non-breaking spaces visible ]======

    exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~"
    set list

"====[ dragvisuals ]======

    runtime plugin/dragvisuals.vim
    vmap  <expr>  h        DVB_Drag('left')
    vmap  <expr>  l        DVB_Drag('right')
    vmap  <expr>  j        DVB_Drag('down')
    vmap  <expr>  k        DVB_Drag('up')
    "vmap  <expr>  D        DVB_Duplicate()

    " Remove any introduced trailing whitespace after moving...
    let g:DVB_TrimWS = 1

The file dragvisuals.vim is in the archive linked above.

Categories: vim Tags: