dhcp-script=/etc/detect_new_device.sh
Reference:
dhcp-script=/etc/detect_new_device.sh
Reference:
# If you use bash, this technique isn't really zsh specific. Adapt as needed. | |
source ~/keychain-environment-variables.sh | |
# AWS configuration example, after doing: | |
# $ set-keychain-environment-variable AWS_ACCESS_KEY_ID | |
# provide: "AKIAYOURACCESSKEY" | |
# $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY | |
# provide: "j1/yoursupersecret/password" | |
export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID); | |
export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY); |
Using py.test is great and the support for test fixtures is pretty awesome. However, in order to share your fixtures across your entire module, py.test suggests you define all your fixtures within one single conftest.py
file. This is impractical if you have a large quantity of fixtures -- for better organization and readibility, you would much rather define your fixtures across multiple, well-named files. But how do you do that? ...No one on the internet seemed to know.
Turns out, however, you can define fixtures in individual files like this:
tests/fixtures/add.py
import pytest
@pytest.fixture
package log | |
import ( | |
"fmt" | |
"github.com/Sirupsen/logrus" | |
"runtime" | |
"strings" | |
) | |
var logger = logrus.New() |
import time | |
from boto.ec2.autoscale import AutoScaleConnection | |
def find_unused_launch_configs(): | |
conn = AutoScaleConnection() | |
autoscale_groups = conn.get_all_groups(max_records=100) | |
launch_configs = conn.get_all_launch_configurations(max_records=100) | |
launch_config_names = {lc.name for lc in launch_configs} |
## | |
# "I did [mean that]" | |
# Re-run the suggested git command | |
# Intended to be run as 'idid !!' | |
## | |
function idid() { | |
declare last='' | |
while [[ $# > 0 ]]; do | |
last="$last $1" |
#!/usr/bin/python | |
""" | |
To use this to mimic the EC2 metadata service entirely, run it like: | |
# where 'eth0' is *some* interface. if i used 'lo:0' i got 5 second or so delays on response. | |
sudo ifconfig eth0:0 169.254.169.254 netmask 255.255.255.255 | |
sudo ./mdserv 169.254.169.254:80 | |
Then: | |
wget -q http://169.254.169.254/latest/meta-data/instance-id -O -; echo | |
curl --silent http://169.254.169.254/latest/meta-data/instance-id ; echo |