- Documentation: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
- Use case: broadcasting data from server to browsers
- Benefits:
- Easy to understand and implement (only a few lines of code)
- No library is needed
- Can use same HTTP(S) authentication as elsewhere in the app (which can’t be done with websockets)
<!doctype html> | |
<!-- This is just a very slightly modified tracking.js demo: https://trackingjs.com/examples/face_camera.html --> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/tracking-min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/data/face-min.js"></script> | |
<style> | |
video, canvas { | |
margin-left: 100px; |
function * fibo () { | |
let a = 0, b = 1; | |
while (true) { | |
yield b; | |
[a, b] = [b, a + b]; | |
} | |
} | |
function getIterable (iter) { | |
return iter.next ? iter : iter(); |
This this super outdated, see v2 here
https://egghead.io/
https://github.com/trekhleb/javascript-algorithms
https://habr.com/post/359192/ алгоритмы на js все
https://www.youtube.com/watch?v=j4_9BZezSUA event loop
https://fseby.wordpress.com/2016/02/25/практическая-вводная-в-монады-в-javascript/
https://habrahabr.ru/company/mailru/blog/327522/ (Функциональное программирование в JavaScript с практическими примерами)
#!/usr/bin/env bash | |
function __tc_encode { | |
# Only unicode characters are not supported | |
echo -n "$1" | sed "s/\([|']\)/\|\1/g; s/\[/\|\[/g; s/\]/\|\]/g; s/\r/\|r/g;" | sed ':a;N;$!ba;s/\n/|n/g' | |
} | |
function __tc_message { | |
echo "##teamcity[message text='$(__tc_encode "$2")' status='${1:-NORMAL}']" | |
} | |
function __tc_simple { |
#!/usr/bin/env bash
if [ ! -f /tmp/linux ]; then
curl -sS https://www.linux.org.ru/ | egrep -o /tag/[0-9a-z-]+ | sed 's|/tag/||' > /tmp/linux
fi
if [ ! -f /tmp/pron ]; then
curl -sS http://www.xvideos.com/tags | egrep -o /tags/[a-z0-9-]+ | sed 's|/tags/||' > /tmp/pron
fi
100+ different js counter apps... |
ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows
Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)
With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.