Converted via https://domchristie.github.io/turndown
11 July 2020
# I want to sync the local clock but don't have access to any NTP server. | |
# Website https://time.is tells me the time difference of my system clock and I can manually adjust the local clock. | |
# But then I recall that a HTTP response often contains a date header with current time in GMT timezone. | |
# I'll use it to set the system clock with the precision of 1 or 2 seconds. | |
# When I need more accurate time, I can use `datetime` (or `utc_datetime`) from `http://worldtimeapi.org/api/ip.txt` | |
# time from worldtimeapi.org has millisecond precision, you can use it to compare with your system time: | |
date -uIns && time curl -s http://worldtimeapi.org/api/ip.txt | sed -n 's/^utc_datetime://p' | |
date -Ins && time curl -s http://worldtimeapi.org/api/ip.txt | sed -n 's/^datetime://p' |
#!/bin/bash | |
# SSH can access a remote host using a specified network interface | |
# just use -b with local address of that network interface | |
ssh -b 10.20.30.40 [email protected] | |
# add a route to a remote host via a specified network interface | |
sudo ip route add 12.34.56.0/24 via 40.30.20.10 dev wlp2s0 | |
# delete a route in the routing table | |
sudo ip route delete 12.34.56.0/24 |
// use the web page at http://marlot.org/util/calcul-de-la-cle-nir.php | |
// when you input the data, it will calculate the check digits (Clé de contrôle) | |
// ref: https://en.wikipedia.org/wiki/INSEE_code | |
// run this in console to get the NIR string: | |
v=ids=>ids.split(',').map(id=>(e=document.getElementById(id),e.value||e.textContent)).join(' '); | |
v('sexe,annee,mois,dept,commune,ordre,cle'); | |
// or, patch function CalculerCleNir in http://marlot.org/util/js/global.js | |
// line 149: cle.innerHTML=calculCle; |
// while reading "Why List Comprehension is Bad" (http://xahlee.info/comp/list_comprehension.html), | |
// I notice that JS don't have integer list generator like 0..9 or range(0,9) | |
// I wanna see if a one-liner can generate 1 list of integer i where 0 <= i < 9 | |
// ref: https://stackoverflow.com/questions/3895478/does-javascript-have-a-method-like-range-to-generate-a-range-within-the-supp | |
// benchmark: https://jsbench.me/tykijeavk9/1 (from https://stackoverflow.com/questions/3746725/how-to-create-an-array-containing-1-n/65244361#65244361) | |
// using generator | |
function*(){let i=0;while(i<9)yield i++}() | |
function*(i=0){while(i<9)yield i++}() |
Converted via https://domchristie.github.io/turndown
11 July 2020
Each bookmark is stored in a shortcut file under %USERPROFILE%/Favorites It looks like this:
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,15
[InternetShortcut]
URL=javascript:alert('oh yea')
IDList=
[Bookmarklet]
ExtendedURL=javascript:alert('oh yea')
Online music/voice separator based on neural nets (using best models, including some from Sound Demixing Challenge) https://mvsep.com/
Quality of algorithms comparison https://mvsep.com/en/quality
Details of algorithms https://mvsep.com/en/algorithms
GUI for popular Vocal Remover models that uses Deep Neural Networks.
-- return day of week (Mon=1, Tue=2, ... Sun=7) | |
FUNCTION WeekDay(weekdayName IN VARCHAR2) RETURN INTEGER AS | |
weekDay INTEGER; | |
BEGIN | |
SELECT DECODE(weekdayName, 'Mon', 1, 'Tue', 2, 'Wed', 3, 'Thu', 4, 'Fri', 5, 'Sat', 6, 'Sun', 7) INTO weekDay FROM Dual; | |
RETURN weekDay; | |
end WeekDay; | |
--End function return day of week | |
-- return Nth business date after or before start date (excluding Saturday and Sunday) |