Can check if you're using swap with sudo swapon --show and free -h.
Useful for t2.micro and other instances with no access to instance store. Use this if you prefer not to mess with the root volume.
- Create the EBS volume e.g., 1 GB.
| # Mirror of the instructions available here: | |
| # http://www.lowefamily.com.au/2016/06/02/installing-ubiquiti-unifi-controller-5-on-raspberry-pi/ | |
| # | |
| # These commands CANNOT be run in a script. | |
| # They're just for reference. | |
| # Install on Raspbian Jessie, or upgrade from Wheezy. | |
| # Make sure all packages are upgraded (update && upgrade). |
| #!/bin/bash | |
| yum update -y | |
| curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/7/fpco.repo | tee /etc/yum.repos.d/fpco.repo | |
| yum -y install stack | |
| sudo -H -u ec2-user -- stack setup | |
| # TODO(2016-04-14): Maybe download files and run `stack build`. | |
| # NOTE: This script is mostly just for fun // a learning exercise. It's | |
| # probably better to use something like Travis CI that can cache the | |
| # ~/.stack/ directory to make build times reasonable. Though the | |
| # whole point of this is to run on Amazon Linux for building static |
| {- | |
| The origin of this puzzle if from #codingame chat. Ideas for the high | |
| level approach come from TheNinja. | |
| Write a program that outputs all possibilities to put + or - or nothing | |
| between the numbers 1,2,...,9 (in this order) such that the result is | |
| equal to stdin. For an example: 1 + 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100. | |
| Usage: |
| import Data.Char (digitToInt) | |
| import System.IO | |
| main :: IO () | |
| main = do | |
| hSetBuffering stdout NoBuffering | |
| putStrLn $ concatMap toFancy $ sumOfDigits fib | |
| toFancy :: Integer -> String | |
| toFancy x |
| <wunderlist-2015062-17-18-11.json jq '.data.tasks | .[] | select(.list_id == 143399535) | select(.completed == false) | .title' --raw-output |
| # Add these, though they didn't seem to take effect for me. | |
| server=8.8.8.8 | |
| server=8.8.4.4 |