Assignment | |
---|---|
Assign value to variable if variable is not already set. Value will be returned.Couple with : no-op if return value is to be discarded. |
${variable="value"} : ${variable="value"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud projects create <your>-dl --enable-cloud-apis | |
gcloud config set project <your>-dl | |
gcloud services enable compute.googleapis.com | |
gcloud iam service-accounts create gcp-terraform-dl --display-name gcp-terraform-dl | |
gcloud projects add-iam-policy-binding <your>-dl \ | |
--member='serviceAccount:gcp-terraform-dl@ <your>-dl.iam.gserviceaccount.com' --role='roles/owner' | |
gcloud iam service-accounts keys create 'credentials.json' --iam-account='gcp-terraform-dl@<your>-dl.iam.gserviceaccount.com' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pycurl | |
from tqdm import tqdm | |
downloader = pycurl.Curl() | |
def sanitize(c): | |
c.setopt(pycurl.UNRESTRICTED_AUTH, False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## create an ubuntu 14.04 hvm instance, then from your home directory: | |
# 1. download this script | |
# wget https://gist.githubusercontent.com/waylonflinn/506f563573600d944923/raw/install-python-data-science.sh | |
# 2. make it executable | |
# chmod a+x install-python-data-science.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |