TEST
-
Connect to the Linux server running in AWS
- Host =
- User = ec2-user
- Private key in this gist
""" | |
Example of checking wether the current time is between | |
a start and end time. This assumes no access to timespan like functions | |
and is why the times are integers. | |
Use nose to run tests with `nosetests check_time_between.py` | |
""" | |
def test_before_window(): |
import click | |
def prompt_proxy(ctx, param, use_proxy): | |
if use_proxy: | |
host = ctx.params.get('proxy_host') | |
if not host: | |
host = click.prompt('Proxy host', default='localhost') | |
port = ctx.params.get('proxy_port') |
#!/bin/bash -e | |
array=( | |
one | |
two | |
three | |
) | |
for item in "${array[@]}"; do | |
echo $item |
def get_nested_value(originalDict, path): | |
keys = path.split('.') | |
val = originalDict | |
for key in keys: | |
val = val.get(key) | |
return val |
create_files_with_dates () { | |
file_name=$1 | |
num_days=$2 | |
tmp_dir="tmp/" | |
mkdir -p $tmp_dir | |
for ((i=0; i <= $1 - 1; i++)); do | |
day=`date -j -v-${i}d +%Y%m%d` | |
> ${tmp_dir}${day}${file_name} |
git clone --mirror <clone-url> | |
cd reponame | |
git bundle create ../reponame.bundle --all |
# git remote add upstream <origin-url> | |
git fetch upstream | |
git merge upstream/master | |
git push origin master | |