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 | |
set -efuo pipefail | |
move='aws s3 mv' | |
list='aws s3 ls' | |
function cleanS3Bucket { | |
rootName="live-$1" | |
rootPath="s3://$rootName" |
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
{-# 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 |
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
whenM (ms_isNeeded ms) | |
(ifM (pure (isJust (ms_onFailure ms)) <&&> isManagerAlive m) | |
(fromJust (ms_onFailure ms) >> reloadManager m) | |
(killManager m)) |
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
$ mysqld --skip-grant-tables | |
$ mysql -u root mysql | |
$ update user set authentication_string=password('my_password') where user='root'; | |
$ FLUSH PRIVILEGES; | |
# Restart mysqld without --skip-grant-tables flag. | |
# It's done! | |
$ mysql -u root mysql |
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://www.tecmint.com/command-line-tools-to-monitor-linux-performance/ | |
# Top – Linux Process Monitoring | |
$ top | |
# VmStat – Virtual Memory Statistics | |
$ vmstat | |
# Lsof – List Open Files | |
$ lsof |
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
VAL=`echo '{"request":{"mbean":"com.hazelcast:instance=_hzInstance_1_dev,name=_hzInstance_1_dev,type=HazelcastInstance","attribute":"memberCount","type":"read"},"value":2,"timestamp":1463556795,"status":200}' | sed -e 's/^.*"type"[ ]*:[ ]*"//' -e 's/".*//'` | |
echo $VAL |
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
ssh -v denisshevchenko@hostname |
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
stack --resolver nightly exec stackage-curator check |
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
mkdir test | |
cd test | |
git init | |
git remote add channels git://github.com/NixOS/nixpkgs-channels.git | |
git remote update channels | |
git checkout nixos-16.03 | |
cd | |
nix-env -f test/ -i firefox |
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
general: | |
branches: | |
ignore: | |
- gh-pages | |
dependencies: | |
cache_directories: | |
- "~/.stack" | |
pre: | |
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 575159689BEFB442 |