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 OverloadedStrings #-} | |
import Network.HTTP.ReverseProxy | |
import Network.HTTP.Client | |
import Network.HTTP.Types | |
import qualified Network.Wai as WAI | |
import Network.Wai.Handler.Warp (run) | |
import Data.Conduit.Network | |
main :: IO () |
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
Host-Only vboxnet0 | |
Adapter | |
IPv4 Address: 192.168.56.100 | |
IPv4 Mask: 255.255.255.0 | |
DHCP | |
Enable | |
192.168.56.100 | |
255.255.255.0 |
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 |
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
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
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
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
# 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
$ 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
whenM (ms_isNeeded ms) | |
(ifM (pure (isJust (ms_onFailure ms)) <&&> isManagerAlive m) | |
(fromJust (ms_onFailure ms) >> reloadManager m) | |
(killManager m)) |