Thursday, 27 June 2019

scheduled tasks - Windows equivalent to cron?


What's the Windows equivalent to cron, or for those of you unfamiliar with Unix, how does one schedule a program to run at regular intervals?



Answer



Scheduled Tasks:



With Scheduled Tasks, you can schedule any script, program, or document to run at a time that is most convenient for you. Scheduled Tasks starts every time that you start Windows XP and runs in the background, and it starts each task that you schedule at the time that you specify when you create the task.



Also, you should check out this article from Lifehacker on using Scheduled Tasks. It gives examples for Defragging your computer, restarting your computer, and opening Firefox when at startup with a set of websites


How can I reset my windows 7 file permissions to a rational state?

I've messed up my file permissions on my home directory. Here's a small sampling of the output from AccessEnum


enter image description here


How can I fix this so that there's one set of rational permissions, that is


Read and Write for on c:\users\scott (recursively) for Administrators and my own account?


Command line solutions preferred.

macos - where is the .emacs files in Snow Leopard?


where is the .emacs file in Snow Leopard? I need it to configure Emacs.



Answer



emacs will not create the config file for you. If you wish to make configurations you can create the file manually and start your configuration. You should place it in your home directory.


You could also use M-x customize to use emacs's inbuilt customization tool. Any changes saved in customize will be saved in your .emacs file (a new one will be created if one does't already exist).


Magic Mouse scrolling on Windows 8


I've managed to get the mouse detected and the general clicking and mouse moving functionality works fine, but no scrolling, nor gestures?


I'm unsure if gestures are supported, if not that's completely fine.


But does anyone know how to get the scrolling to work?


I assume if the functionality works on Windows 7 it'll also comply with Windows 8. I haven't had any luck with what I've found on the net.



Answer



You may want to look into this utility. It will install the necessary utilities for touch scroll support. Have not verified that it works, but looks promising.


http://www.trackpadmagic.com/magic-mouse/download


browser - How can I download an old version of Google Chrome


For testing purposes, I need to download an old version of Goolge Chrome. I need the stable release of Google Chrome version 69.0.3497.81 to test some of its features. I need to open it and navigate with it (I think this require turning off the updates).


My system is Ubuntu 18.04 64-bit and it has Version 70.0.3538.110 (Official Build) (64-bit).


I could not find any trusted source where I can download an old release of Google Chrome. I find some shady websites with .exe files and I do not want to download from them for security reasons.



Answer



Google does not offer older Versions of Chrome, in the name of Security.


You may find older versions on The Chromium Project, although the version may differ slightly on the last number component.


You may have a look at some Chrome clones. For example, Slimjet is a Webbrowser based on Chrome does provide some older versions of Chrome. To download visit the Slimjet Site to access the archive, where I found version 69.0.3497.92 as the closest.


For Chrome/Chromium itself, there are great difficulties in finding older versions.


Here are some possibilities (which I haven't tried) :



windows 7 - My HP laptop shows a BIOS error


Sometimes, when I startup my HP laptop I get a message like this (I am not accurately sure of the message but it is something like this)



HP Bios Startup error


The selected bios file was not found. It is either corrupt or missing


Please visit http://hp.com/go/techcenter/startup


Please Press ENTER - to Continue.



When I press enter nothing bad happens, My system just starts up normally. I have had a similar problem with my desktop but whenever I press enter the computer restarts and doesn't startup. I was told that a virus had attacked my system.


I am very worried. Is the same thing happening here?, How will it affect my system? and What can I do?



Answer



i suppose that your laptop bios is UEFI (Unified Extensible Firmware Interface). Most likely that the HP_TOOLS EFI is missing form the system. If you formatted/reformatted or replaced your HDD/SSD it could be that there is no efi-partition (HP_Tools) installed.


I think that correct error message is:



The HP BIOS application selected is corrupt or missing. Please install the application and try again.


BIOS Application Error (501)


Enter - Continue



To fix this do the following:




  1. Enter your BIOS by pressing F10 (I think) while booting up

  2. Navigate to System Configuration / Device Configurations

  3. Find the option called HP Quicklook or HP Quicklook 2 and set it to Disabled

  4. Save the changes and exit



This should get past this message


Wednesday, 26 June 2019

video - FFmpeg - Apply blur over face


I'm trying to blur a portion of a video using FFmpeg (specifically to blur a face).


I have been trying to use a combination of timeline editing and the various bluring filters, but I cannot find a way to blur only a section of the video.


I'm hoping for something like:


-vf boxblur=enable='between(t,10,100)':width=20:height=20:x=400:y=200

Where width/height is size of blurred box and x/y are location of blurred box.


Is something like this possible?



Answer



It is possible to apply temporal and spatial blurring to a segment/section – assuming the area you want to blur is a static location.


Black lab pup
Original black lab pup image.



enter image description hereenter image description here
Grayscale PNG mask image and resulting blurred image.


You can make a grayscale mask image to indicate the area to blur. For ease of use it should be the same size as the image or video you want to blur.


Example using alphamerge, boxblur, and overlay:


ffmpeg -i video.mp4 -i mask.png -filter_complex "[0:v][1:v]alphamerge,boxblur=10[alf];[0:v][alf]overlay[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy -movflags +faststart maskedblur.mp4



  • The white area is where the blur will occur, but this can easily be reversed with the negate filter for instance: [1:v]negate[mask];[0:v][mask]alphamerge,boxblur=10[alf]...




  • You could use the geq filter to generate a mask such as a gradient.





Black lab pup with blur effect


ffmpeg -i derpdog.mp4 -filter_complex \
"[0:v]crop=200:200:60:30,boxblur=10[fg]; \
[0:v][fg]overlay=60:30[v]" \
-map "[v]" -map 0:a -c:v libx264 -c:a copy -movflags +faststart derpdogblur.mp4

Note: The x and y offset numbers in overlay (60 and 30 in this example) must match the crop offsets.


What this example does:



  1. Crop the copy to be the size of the area to be blurred. In this example: a 200x200 pixel box that is 60 pixels to the right (x axis) and 30 pixels down (y axis) from the top left corner.

  2. Blur the cropped area.

  3. Overlay the blurred area using the same x and y parameters from the crop filter.



enter image description here
Blurred areas in top left, near center, and bottom.


"[0:v]crop=50:50:20:10,boxblur=10[b0]; \
[0:v]crop=iw:30:(iw-ow)/2:ih-oh,boxblur=10[b1]; \
[0:v]crop=100:100:120:80,boxblur=10[b2]; \
[0:v][b0]overlay=20:10[ovr0]; \
[ovr0][b1]overlay=(W-w)/2:H-h[ovr1]; \
[ovr1][b2]overlay=120:80"


enter image description here


"[0:v]boxblur=10[bg];[0:v]crop=200:200:60:30[fg];[bg][fg]overlay=60:30"

Additional stuff



How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...