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
#!/bin/bash
set -efuo pipefail
move='aws s3 mv'
list='aws s3 ls'
function cleanS3Bucket {
rootName="live-$1"
rootPath="s3://$rootName"
{-# 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
whenM (ms_isNeeded ms)
(ifM (pure (isJust (ms_onFailure ms)) <&&> isManagerAlive m)
(fromJust (ms_onFailure ms) >> reloadManager m)
(killManager m))
$ 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
# 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
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
ssh -v denisshevchenko@hostname
stack --resolver nightly exec stackage-curator check
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
general:
branches:
ignore:
- gh-pages
dependencies:
cache_directories:
- "~/.stack"
pre:
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 575159689BEFB442