Skip to content

Instantly share code, notes, and snippets.

View denisshevchenko's full-sized avatar
🏠
Working from home

Denis Shevchenko denisshevchenko

🏠
Working from home
View GitHub Profile
{-# LANGUAGE MultiWayIf #-}
module Main where
main :: IO ()
main = print $ maxLength [10, 9, 2, 3, 4, 6] 500
maxLength :: [Int] -> Int -> Int
maxLength numbers aLimit = collector numbers aLimit []
where
#!/bin/bash
set -efuo pipefail
move='aws s3 mv'
list='aws s3 ls'
function cleanS3Bucket {
rootName="live-$1"
rootPath="s3://$rootName"
dd bs=4M if=/path/tp/some.iso of=/dev/sdb
где sdb - путь к физической флешке, без разделов.
set clipboard+=unnamedplus
" А затем делаем sudo apt-get install xclip

Minimum set of Vimperator commands

Action Command Comment
Open URL in new tab t + URL After t insert URL and hit Enter.
If URL is in the history - use TAB to complete it.
Open URL in current tab o + URL After o insert URL and hit Enter.
If URL is in the history - use TAB to complete it.
Open URL in new window w + URL After w insert URL and hit Enter.
If URL is in the history - use TAB to complete it.
Move to another tab gt From left to right.
Close current tab d
Refresh current page r
$ git clone [email protected]:dunmersskooma/2-2.git
$ cd 2-2
$ python setup.py sdist
$ sudo python setup.py install
$ helloworld
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Text ( Text )
type Name = Text
type Age = Int
type Citizenship = Text
type GoalCountry = Text
class Show a where
show :: a -> String
data Jump = Jump Int
instance Show Jump where
show (Jump n) = "Мой прыжок равен " ++ show n ++ " см"
main :: IO ()
main = print jump
checkLocalhost :: String -> String
checkLocalhost ip
| ip == "127.0.0.1" = "It's a localhost!"
| ip == "0.0.0.0" = "It's a localhost!"
| ip == "::1/128 (0:0:0:0:0:0:0:1)" = "It's a localhost!"
| otherwise = "No, it's not a localhost."
getHeightOfTheSecondDoor :: House -> Height
getHeightOfTheSecondDoor (House _ doors _) = height
where
(Door _ height _) = secondDoor
secondDoor = doors !! 1