Archive for the ‘Knowledge Base’ Category

Windows: hold Shift while right clicking in the folder

MAC OS X: System Preferences > Keyboard > Shortcuts > Services: Enable New Terminal at Folder.

Tasks: setTimeout, setInterval, setImmediate, I/O, UI rendering

MicroTasks: Promises, Object.observe, MutationObserver

MicroTasks generate from the current task will be executed before the next task.

https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/

How to check reboots history in Linux

Posted: October 7, 2016 in Linux

last reboot

To create virtual host in Apache is very easy. In 2.4, it becomes easier because Apache will automatically process those and NameVirtualHost won’t have any effect.

I assume you have read this nice guide, https://httpd.apache.org/docs/2.4/vhosts/examples.html

If it’s still not working, set your SELinux permissive.

I tried git fsck and git gc without success. The one working solution is

$git gc
$git pull --rebase

After resolving any conflicts and finishing the rebase, then you can push again.

I have been using Amzon Cloud Drive to back up all my personal videos, but i noticed recently that many of my videos have a date taken as NO DATE or 1970.

After some research, i found the answer in this post. Amazon Cloud Drive seems to read the date from some video tags instead of the file creation date.

I wrote the below windows batch script to set those tags based on file creation date. The script is based on a system date format mm/dd/yyyy hh:ii tt.

@ECHO OFF

SET filename="c:\your\video\file.mp4"

for %%a in (%filename%) do set filedatetime=%%~ta

ECHO %filedatetime%

set month=%filedatetime:~0,2%
set day=%filedatetime:~3,2%
set year=%filedatetime:~6,4%
set hour=%filedatetime:~11,2%
set minute=%filedatetime:~14,2%
set second=00
set pm=%filedatetime:~17,2%

if "%pm%" == "PM" (
set /a hour=1%hour%-100+12
)

if "%hour%" == "24" (
set /a hour=12
)

set finaldatetime="%year%:%month%:%day% %hour%:%minute%:%second%"

ECHO %finaldatetime%
:: set finaldatetime="2014:07:12 21:32:00"

exiftool %filename% -filecreatedate=%finaldatetime%
exiftool %filename% -filemodifydate=%finaldatetime%
:: exiftool %filename% -fileaccessdate=%finaldatetime%
exiftool %filename% -createdate=%finaldatetime%
exiftool %filename% -modifydate=%finaldatetime%
exiftool %filename% -trackcreatedate=%finaldatetime%
exiftool %filename% -trackmodifydate=%finaldatetime%
exiftool %filename% -mediacreatedate=%finaldatetime%
exiftool %filename% -mediamodifydate=%finaldatetime%

 


openssl s_client -connect www.example.com:443 -tls1_2
nmap --script ssl-enum-ciphers -p 443 www.example.com

Credit:http://serverfault.com/questions/638691/how-can-i-verify-if-tls-1-2-is-supported-on-a-remote-web-server-from-the-rhel-ce