This file contains hidden or 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
Мой оптимизм и моя уверенность происходят не от того, что я чувствую себя счастливее других смертных, и, конечно, они не связаны с тем, что я «нацелен на успех». Они появляются в результате того, что всю свою жизнь я отчетливо представляю себе разные угрозы и опасности и выясняю, как их избежать. | |
Как и большинство астронавтов, я почти уверен, что смогу справиться с любыми «подарками» судьбы, поскольку заранее продумал, что делать, если что-то пойдет не так, как, впрочем, и в случае удачного стечения обстоятельств. В этом и заключается сила негативного мышления. | |
============================= | |
они обладают выдающимися талантами, и до того, как эти люди оказались в Космическом центре Джонсона, им все давалось легко: они побеждали в летных соревнованиях, превосходно сдавали экзамены, рассказывали самые интересные истории — и все это не уронив ни капли пота. | |
Рано пришедший успех — ужасный учитель. По существу, вас награждали за недостаточную подготовку, поэтому в ситуации, когда готовиться необходимо, вы не спра |
This file contains hidden or 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
To work on Win10 install there Ubuntu. for Ansible | |
read `Continous delivery'` |
This file contains hidden or 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 | |
LOG=~/tmp/kov-od/03-23.txt | |
P_PRE=$(tac $LOG | egrep -m 1 'Плацкарт' | egrep -o '[[:digit:]]+') | |
K_PRE=$(tac $LOG | egrep -m 1 'Купе' | egrep -o '[[:digit:]]+') | |
function show-last () { | |
echo "Купе: $K_PRE"; | |
echo "Плацкарт: $P_PRE"; | |
echo; |
This file contains hidden or 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
Нет такой одноразовой вещи, котрую русский человек не мог бы использовать дважды. | |
Русский, собираясь в гости, стоит перед выбором: или один носок дырявый, или оба целые, но разные. | |
Сошёл с рельс поезд в Украине. Машинист оправдывается. | |
- Там русский на рельсы вышел. | |
Судья: | |
- Так надо было давить его. | |
- Так я и задавил, только пришлось в поле выехать и гнаться. |
This file contains hidden or 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
module HindleyMilner where | |
import Control.Applicative ((<|>)) | |
import Control.Monad (guard) | |
import Data.Maybe (fromJust) | |
type Symb = String | |
infixr 3 :-> | |
data Type |
This file contains hidden or 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/sh | |
set -e | |
# A script to bootstrap cabal-install. | |
# It works by downloading and installing the Cabal, zlib and | |
# HTTP packages. It then installs cabal-install itself. | |
# It expects to be run inside the cabal-install directory. | |
# Install settings, you can override these by setting environment vars. E.g. if |
This file contains hidden or 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
import Data.Char (digitToInt) | |
import Data.List (unfoldr) | |
import Data.Tuple (swap) | |
bin2dec :: String -> Integer | |
bin2dec = foldl (\d i -> d*2 + i) 0 . map (toInteger . digitToInt) | |
-- dec2bin = reverse . map intToDigit . unfoldr (test . swap . flip divMod 2) where test x = if x == (0,0) then Nothing else Just x | |
matrix b = unfoldr (test . swap . flip divMod b) where test x = if x == (0,0) then Nothing else Just x |
This file contains hidden or 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
program = drawingOf(sinPlot & cosPlot & coordinatePlane) | |
rmax = 2 * 180 | |
k = rmax / 10 | |
ymax = 5 | |
sinPlot = trigLine sin | |
cosPlot = trigLine cos | |
trigLine f = curve([(x, y) | p <- [-10 .. 10], d <- [0 .. 9], let x = p + d/10, let y = ymax * f (x * k)]) |
This file contains hidden or 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
// http://sandbox.onlinephpfunctions.com/code/d1983f5ae45977a035bfb54a9d8782c74c69833c | |
<?php | |
$t = date("H"); | |
if ($t < 18) { | |
echo "Have a good day!"; | |
} | |
else {echo "Good evening!";} | |
echo "\n"; |
This file contains hidden or 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
-- https://www.w3schools.com/sql/trysql.asp | |
CREATE TABLE Countries( | |
ID int IDENTITY(1,1) PRIMARY KEY, | |
Country varchar(255), | |
Continent varchar(255) | |
); | |
INSERT INTO Countries (Country) | |
SELECT DISTINCT Country FROM Customers; |