https://nixos.wiki/wiki/NixOS_Installation_Guide#Installing_from_the_installation_media
https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html
| -- taken from https://www.youtube.com/watch?v=fg24wrRKE8g | |
| import Prelude hiding (Maybe(..), lookup) | |
| data Maybe a = Just a | Nothing | |
| deriving Show | |
| favoriteFoods :: [(String, String)] | |
| favoriteFoods = [("David", "Green Papaya Salad") | |
| ,("Becky", "Sorbet")] | |
| func ConvertStructToMap(st interface{}) map[string]interface{} { | |
| reqRules := make(map[string]interface{}) | |
| v := reflect.ValueOf(st) | |
| t := reflect.TypeOf(st) | |
| for i := 0; i < v.NumField(); i++ { | |
| key := strings.ToLower(t.Field(i).Name) | |
| typ := v.FieldByName(t.Field(i).Name).Kind().String() |
| import "net/http/httputil" | |
| func (c *Client) DoRequest(r *request) (*http.Response, error) { | |
| req, err := r.toHTTP() | |
| if err != nil { | |
| return nil, err | |
| } | |
| req.Header.Set("User-Agent", c.config.UserAgent) | |
| if r.body != nil { | |
| req.Header.Set("Content-type", "application/json") |
| #!/bin/bash | |
| # example execution | |
| # ./rmq-smoke-test.sh --api https://<api.mycf.com> --user <usr> --password <password> --org smoke-tests --space the-final-frontier --domain <run.appsdomain.com> | |
| set -e -u | |
| while test $# -gt 0; do | |
| case "$1" in | |
| --api) |
| // Get the largest screen dimension | |
| // reason for doing this is a phone may start in portrait then move to landscape | |
| var maxScreenDimension = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth; | |
| // assuming tiles are 256 x 256 | |
| var tileSize = 256; | |
| // How many tiles needed to for the largest screen dimension | |
| // I take the floor because I don't want to see more then 1 world | |
| // Use Math.ceil if you don't mind seeing the world repeat |