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 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 ()
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
general:
branches:
ignore:
- gh-pages
dependencies:
cache_directories:
- "~/.stack"
pre:
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 575159689BEFB442
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
stack --resolver nightly exec stackage-curator check
ssh -v denisshevchenko@hostname
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
# 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
$ 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
whenM (ms_isNeeded ms)
(ifM (pure (isJust (ms_onFailure ms)) <&&> isManagerAlive m)
(fromJust (ms_onFailure ms) >> reloadManager m)
(killManager m))