Skip to content

Instantly share code, notes, and snippets.

View torumakabe's full-sized avatar

Toru Makabe torumakabe

View GitHub Profile
#!/bin/bash
BASE_NAME="yourbasename"
echo "[Resource Group ${BASE_NAME}-rg] Creating Resource Group..."
az group create -n ${BASE_NAME}-rg -l japaneast
echo "[VNET vnet01] Creating VNET..."
az network vnet create -g ${BASE_NAME}-rg \
-n vnet01 \
certbot certonly --manual --domain <fqdn> --email <mail> --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns
#!/bin/bash
echo echo "Custom Script executed at: `date`" > ~/runext_time.txt
#!/bin/bash
apt update -y
apt install nginx -y
echo "Ver.3" > /var/www/html/index.nginx-debian.html
#!/bin/bash
apt update -y
apt install nginx -y
echo "Ver.2" > /var/www/html/index.nginx-debian.html
#!/bin/bash
apt update -y
apt install nginx -y
echo "Ver.1" > /var/www/html/index.nginx-debian.html
# List CustomScript Extension
az vm extension image list --query "[?name=='CustomScript']"
# List API Versions
az provider show -n Microsoft.Resources --query "resourceTypes[?resourceType=='deployments'].[apiVersions]"
@torumakabe
torumakabe / laquery.js
Created December 19, 2017 04:56
Azure Log Analytics API call Sample
const request = require('request');
const tenant = '<Your Tenant ID>';
const subscriptionId = '<Yout Subscription ID>';
const clientId = '<Your Service Principal App ID>';
const clientSecret = '<Your Service Principal Password>';
const resourceGroup = '<Your Resource Group Name of Log Analytics Workspace>';
const workSpace = '<Your Workspace Name>';
#!/bin/bash
# This script was tested for Ubuntu 16.04 LTS
# An set of disks to ignore from partitioning and formatting
BLACKLIST="/dev/sda|/dev/sdb"
# Base directory to hold the data* files
DATA_BASE="/datadrive"
usage() {
# Learn more: http://boxstarter.org/Learn/WebLauncher
# Install manually (Ubuntu, VS, Azure PS, 1Password 6, Driver Management Tool)
#---- TEMPORARY ---
Disable-UAC
#--- Fonts ---
choco install inconsolata
#--- Windows Settings ---