Linux Move Folder Contents To Another Directory mv -vn foldername/* /path_to_folder/foldername -v: verbose -n: dont overwrite file if file already exists
Programming, Security and Tech (and Code Snippets)
Htaccess Redirect With Query String TO File In A Different Directory <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^video.php https://domain.name/folder1/folder2%{REQUEST_URI} [R=302,NC] </IfModule> #if your query strnig is as such, index.php?q=1&b=2 #then %{REQUEST_URI} will create the url like so https://domain.name/folder1/folder2/index.php?q=1&b=2
FluidPlayer With Logo Example Code Here’s an example of using fluidplayer video with logo, in case anyone needs it. The documentation for FluidPlayer logo is here. <video id=’fp-core-video-0′ src=’https://cdn.fluidplayer.com/videos/valerian-480p.mkv’ style=’min-width:600px;min-height:380px;’> </video> <link rel=”stylesheet” href=”https://cdn.fluidplayer.com/v2/current/fluidplayer.min.css” type=”text/css”/> <script src=”https://cdn.fluidplayer.com/v2/current/fluidplayer.min.js”></script> <script> fluidPlayer( ‘fp-core-video-0’,…
Linux Command To Sort du -h By File Size A quick command to sort du -h by file size using perl. du -h | perl -e ‘sub h{%h=(K=>10,M=>20,G=>30);($n,$u)=shift=~/([0-9.]+)(\D)/; return $n*2**$h{$u}}print sort{h($b)<=>h($a)}<>;’ Output will be like so 4.6M . 3.8M ./folder1…
Chrome Extension – Get Current Or Active Tab Id And URL Here’s a quick code snippet on how you can get your current tab details when developing a chrome plugin or extension. To get current tab id, var tabId =…