Skip to content

Instantly share code, notes, and snippets.

@asears
asears / Retina Figures.ipynb
Created December 20, 2019 07:38 — forked from minrk/Retina Figures.ipynb
2x plots for Retina displays with matplotlib and the IPython Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asears
asears / hiveyarn.yaml
Created November 10, 2019 10:44
Hive on Docker - JSON to YARN example
---
name: hive
lifetime: "-1"
version: 3.1.0.3.1.0.0
artifact:
id: "<docker registry server>:5000/hive2"
type: DOCKER
configuration:
env:
HIVE_LOG_DIR: var/log/hive
$vnetName = "Replace with your virtual network name"
$resourceGroupName = "Replace with the resource group the virtual network is in"
$subnetName = "Replace with the name of the subnet that you plan to use for HDInsight"
# Get the Virtual Network object
$vnet = Get-AzureRmVirtualNetwork `
-Name $vnetName `
-ResourceGroupName $resourceGroupName
# Get the region the Virtual network is in.
$location = $vnet.Location
# Get the subnet object
@asears
asears / settings.json.partial
Created March 5, 2019 14:04
VSCode with Anaconda Terminal Prompt
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": [
"/K","C:\\ProgramData\\Anaconda3\\Scripts\\activate.bat C:\\ProgramData\\Anaconda3"
],
@asears
asears / instdocker.cmd
Created January 24, 2019 02:58
Install Docker Windows with Choco (2019)
choco install docker-cli
choco install docker-desktop
REM reboot or logout
@asears
asears / SetUpstreamAndSquashExample.md
Last active January 5, 2020 13:44
Set Git Upstream and Squash Commits
git remote add upstream [Upstream git URL]

git fetch upstream

git merge upstream/master

git checkout -b "feature-new-stuff"
@asears
asears / delusbfile.cmd
Created December 1, 2018 09:35
Take Ownership and then delete files from internal/external drives
REM takes ownership then deletes files
REM use this for external drives from another machine
set pathname="e:\cygwin64"
takeown /f %pathname% /r
icacls %pathname% /reset /T
del /s /q %pathname%
@asears
asears / clonecard.sh
Created December 1, 2018 09:33
Clone SD Card
#!/bin/bash
dd if=~/card.img of=/dev/rdisk# bs=16M
@asears
asears / startshell.md
Last active August 30, 2018 01:39
Embed Cloud Shell

Launch Cloud Shell

Bash Launch Cloud Shell

Powershell Launch Cloud Shell

@asears
asears / gettoken.sh
Created August 30, 2018 01:30
Get Azure Cloud Shell Access Token
#!/bin/sh
response=$(curl http://localhost:50342/oauth2/token --data "resource=https://management.azure.com/" -H Metadata:true -s)
access_token=$(echo $response | python -c 'import sys, json; print (json.load(sys.stdin)["access_token"])')
echo The MSI access token is $access_token