The figure below calls out
- The netfilter hooks
- The order of table traversal
Here's the simplest example showing how to do functional options in Golang.
They're a great way to enable users to set options and ease adding new options later.
package main
import (
"flag"
"fmt"| #!/bin/bash | |
| module=$1 | |
| for resource in `terraform show -module-depth=1 | grep module.${module} | tr -d ':' | sed -e 's/module.${module}.//'`; do | |
| terraform taint -module ${module} ${resource} | |
| done |
| #!/usr/bin/python | |
| import boto.iam, boto.exception | |
| import argparse, os | |
| import ConfigParser | |
| parser = argparse.ArgumentParser(description="Rotate Access Keys.") | |
| parser.add_argument( | |
| "-p", | |
| "--profile", |
| #!/usr/bin/env python2.7 | |
| from pex.pex_builder import PEXBuilder | |
| from pex.resolvable import resolvables_from_iterable | |
| from pex.resolver import CachingResolver | |
| from pex.resolver_options import ResolverOptionsBuilder | |
| import argparse | |
| import os | |
| import shutil | |
| import sys |
| rm -rf ~/Library/Application\ Support/Slack/ | |
| rm -rf ~/Library/Containers/com.tinyspeck.slackmacgap/ | |
| rm -rf ~/Library/Preferences/com.tinyspeck.slackmacgap.plist | |
| rm -rf ~/Library/Saved\ Application\ State/com.tinyspeck.slackmacgap.savedState | |
| rm ~/Library/Safari/LocalStorage/*slack* |
| echo First word, Adjective: | |
| curl -s "http://api.wordnik.com:80/v4/words.json/randomWord?hasDictionaryDef=false&includePartOfSpeech=adjective&minCorpusCount=0&maxCorpusCount=-1&minDictionaryCount=1&maxDictionaryCount=-1&minLength=5&maxLength=-1&api_key=YOUR_API_KEY_HERE" | |
| echo | |
| echo | |
| echo Second word, Noun: | |
| curl "http://api.wordnik.com:80/v4/words.json/randomWord?hasDictionaryDef=false&includePartOfSpeech=noun&minCorpusCount=0&maxCorpusCount=-1&minDictionaryCount=1&maxDictionaryCount=-1&minLength=5&maxLength=-1&api_key=YOUR_API_KEY_HERE" | |
| echo | |
| echo | |
| echo Now, combine these two, and you have your name. | |
| echo For example, if your two words were ‘taught’ and ‘webzines’, your name would be TaughtWebzines. |
| <?php | |
| namespace JesusGoku; | |
| /** | |
| * NamesGenerator | |
| * | |
| * Port of NameGenerator use for Docker | |
| * | |
| * @author Jesús Urrutia <[email protected]> |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
| #!/usr/bin/env bash | |
| size=1024 # MB | |
| mount_point=$HOME/tmp | |
| name=$(basename "$mount_point") | |
| usage() { | |
| echo "usage: $(basename "$0") [mount | umount | remount | check | orphan]" \ | |
| "(default: mount)" >&2 | |
| } |