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 с практическими примерами)
https://habrahabr.ru/post/298134/ (FizzBuzz, или почему программисты не умеют программировать)
http://dmitrysoshnikov.com/ecmascript/javascript-the-core-2nd-edition-rus/ (всякое общее)
https://medium.com/@frontman/приведение-типов-в-js-9d6f1845ea96 (приведение типов и др. инфа)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration for Alacritty, the GPU enhanced terminal emulator. | |
# Any items in the `env` entry below will be added as | |
# environment variables. Some entries may override variables | |
# set by alacritty itself. | |
#env: | |
# TERM variable | |
# | |
# This value is used to set the `$TERM` environment variable for | |
# each instance of Alacritty. If it is not present, alacritty will |
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)
Alter the port the script talks to from 8000 to 80:
}).listen(80);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Первый подход (неверный), пытаемся погасить остаток максимальным номиналом | |
* | |
* O(m), m - колич. монет | |
* | |
* @return bool | |
*/ | |
function canPayWithoutChangeBrute($sum, array $denominations) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Recursion splitting: 0.0020239353179932 sec | |
// Cycle splitting: 0.001431941986084 sec | |
// Recursion splitting: 0.000885009765625 sec | |
// Cycle splitting: 0.00057697296142578 sec | |
$i = <<<INI | |
db.user.name = vasya |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Quick sort algorithm | |
* Complexity: O(n log n) to O(n) - depends on a pivot selection | |
*/ | |
function quickSort(arr) { | |
var pivotIndex, | |
pivot, | |
left = [], | |
right = [], | |
len = arr.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Set Language | |
TEXTDOMAIN=virtualhost | |
### Set default parameters | |
action=$1 | |
domain=$2 | |
rootDir=$3 | |
owner=$(who am i | awk '{print $1}') | |
sitesEnable='/etc/nginx/sites-enabled/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:window.setInterval(function(){var c=$("#box span:first-child").css("background-color"),o=$("#box span:nth-child(2)").css("background-color");c!=o&&$("#box span:first-child").click(),$("#box span").each(function(){var o=$(this).css("background-color");return c!=o?($(this).click(),!1):void(c=o)})},10); |