This file contains 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
:(){ :|: & };: |
This file contains 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
# Shell prompt based on the Solarized Dark theme. | |
# Screenshot: http://i.imgur.com/EkEtphC.png | |
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM='gnome-256color'; | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM='xterm-256color'; | |
fi; |
This file contains 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
$ cat .bash_prompt | |
# Shell prompt based on the Solarized Dark theme. | |
# Screenshot: http://i.imgur.com/EkEtphC.png | |
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM='gnome-256color'; | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM='xterm-256color'; |
This file contains 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
$client = new-object System.Net.WebClient | |
$client.DownloadFile("https://s3-us-west-2.amazonaws.com/aws-agent-discovery.us-west-2/windows/installer/latest/DiscoveryAgentInstall.exe","C:\DiscoveryAgentInstall.exe") | |
Start-Process -FilePath "C:\DiscoveryAgentInstall.exe" -ArgumentList "REGION=us-west-2" | |
[3:18] | |
https://s3-us-west-2.amazonaws.com/aws-agent-discovery.us-west-2/windows/installer/latest/DiscoveryAgentInstall.exe | |
new messages | |
[3:21] | |
DiscoveryAgentInstall.exe REGION=us-west-2 |
This file contains 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
# Example PowerShell script to domain join a Windows instance securely | |
$ErrorActionPreference = 'Stop' | |
try{ | |
# Parameter names | |
$DomainDNS = DomainDNSRecord | |
$DomainName = DomainName | |
$DomainJoinUserName = AccountName | |
$DomainJoinPassword = DomainJoinPassword |
This file contains 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 python | |
# pylint: disable=invalid-name | |
# pylint: disable=bare-except | |
# pylint: disable=missing-docstring | |
# pylint: disable=line-too-long | |
# pylint: disable=redefined-outer-name | |
# pylint: disable=protected-access | |
import logging | |
import gzip |
This file contains 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
joesindel at joes-MBP in ~/Documents/repos/ringdna/packer on master [!] | |
$ tree | |
. | |
├── Jenkinsfile | |
├── README.md | |
├── ubuntu-api | |
│ ├── scripts | |
│ │ ├── api-envvars.sh | |
│ │ ├── api.service | |
│ │ ├── application.conf.tmpl |
This file contains 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
$ cat ubuntu-metabase.json | |
{ | |
"variables": { | |
"region" : "", | |
"subnet_id" : "subnet-e6d173ad" | |
}, | |
"builders": [{ | |
"source_ami_filter": { | |
"filters": { |
This file contains 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
$ cat metabase.tmpl | |
MB_DB_TYPE={{ var "MB_DB_TYPE" | default "postgres" }} | |
MB_DB_DBNAME={{ var "MB_DB_DBNAME" | default "ebdb" }} | |
MB_DB_PORT={{ var "MB_DB_PORT" | default "5432" }} | |
MB_DB_PASS="{{ var "MB_DB_PASS" | default "password" }}" | |
MB_DB_USER={{ var "MB_DB_USER" | default "metabase" }} | |
MB_DB_HOST={{ var "MB_DB_HOST" | default "localhost" }} | |
MB_JETTY_PORT={{ var "MB_JETTY_PORT" | default "3000" }} | |
MB_EMOJI_IN_LOGS={{ var "MB_EMOJI_IN_LOGS" | default "false" }} | |
JAVA_OPTS="-Duser.timezone={{ var "MB_TIMEZONE" | default "US/Pacific" }} -Xmx{{ var "MB_HEAPMAX" | default "2048m" }} -Xms{{ var "MB_HEAPMIN" | default "2048m" }}" |
This file contains 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
$ cat mb-envvars.sh | |
#!/bin/bash | |
MAC=$(curl -s http://169.254.169.254/latest/meta-data/mac/) | |
VPCID=$(curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MAC}/vpc-id/) | |
if [[ $VPCID == vpc-fd264e9b ]] | |
then | |
export ENV=prod |
OlderNewer