Skip to content

Instantly share code, notes, and snippets.

View rayterrill's full-sized avatar

Ray Terrill rayterrill

View GitHub Profile
2023-08-03T10:13:21.531-0700 [INFO] Terraform version: 1.3.2
2023-08-03T10:13:21.532-0700 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2023-08-03T10:13:21.532-0700 [DEBUG] using github.com/hashicorp/hcl/v2 v2.14.1
2023-08-03T10:13:21.532-0700 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2023-08-03T10:13:21.532-0700 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2023-08-03T10:13:21.532-0700 [DEBUG] using github.com/zclconf/go-cty v1.11.0
2023-08-03T10:13:21.532-0700 [INFO] Go runtime version: go1.19.1
2023-08-03T10:13:21.532-0700 [INFO] CLI args: []string{"/opt/homebrew/Cellar/tfenv/3.0.0/versions/1.3.2/terraform", "apply"}
2023-08-03T10:13:21.532-0700 [DEBUG] Attempting to open CLI config file: /Users/rayterrill/.terraformrc
2023-08-03T10:13:21.532-0700 [INFO] Loading CLI configuration from /Users/rayterrill/.terraformrc

Build Project, App, and Generate Keys

  1. Sign into twitter with your bot account, and go to https://developer.twitter.com.
  2. If you're in the free account tier and your previous app was suspended, you may need to delete it. Free tier accounts appear to only support 1 app at a time.
  3. Create a project if you don't already have one, and then create an app. Make sure you take note of the keys you get at the end - you'll need these. These are your Consumer Keys and authenticate your application.
  4. Click on your app in the Developer Portal, make sure you're on the "Settings" tab, and click "Set up" under "User authentication settings"
  5. Select "Read and write" under "App permissions, "Web App, Automated App or Bot" under "Type of App", and enter something for Callback URI and Website URL (these aren't used in my flow), then click "Save". You'll get a Client ID and Client Secret - I didn't need these so I just ignored this.
  6. On the app page, click onto the "Keys and tokens" tab, then click "Generate" on "
@rayterrill
rayterrill / main.go
Created June 15, 2022 05:53
Example of yaml marshal with inline map[string]interface
package main
import (
"fmt"
"gopkg.in/yaml.v3"
)
type Person struct {
ExtensionProps map[string]interface{} `yaml:",inline"`
ssh -vvv -i Identity-cert.pub -i Identity popnimda@172.31.29.228
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "172.31.29.228" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 172.31.29.228 [172.31.29.228] port 22.
debug1: Connection established.
debug1: identity file Identity-cert.pub type 4
debug1: key_load_public: No such file or directory
$apps = Get-AzureADApplication -All $true
foreach ($a in $apps) {
try {
$appProxy = Get-AzureADApplicationProxyApplication -ObjectID $a.ObjectID
Write-Host "App Proxy config found for $($a.DisplayName): $($appProxy.ExternalURL) using $($appProxy.externalAuthenticationType)."
} catch {
#no app proxy config found for the app
}
}
@rayterrill
rayterrill / msalPopup.html
Last active August 12, 2019 14:05
Had a hell of a time trying to grok MSAL with simple, fully functional examples - the documentation still is pretty weak. Here are two examples showing both the redirect and popup flows. Hope it helps someone out
<!DOCTYPE html>
<html>
<body>
<div class="container">
<div class="leftContainer">
<p id="WelcomeMessage">Welcome to the Microsoft Authentication Library For Javascript Quickstart</p>
<button id="SignIn" onclick="signIn()">Sign In</button>
</div>
<div class="rightContainer">
<pre id="json"></pre>
@rayterrill
rayterrill / values.yaml
Created June 1, 2019 04:19
Sample values.yaml to configure CoreDNS with an etcd backend using Helm (helm install --name my-coredns --values values.yaml stable/coredns)
isClusterService: false
serviceType: "NodePort"
rbac:
create: true
servers:
- zones:
- zone: .
port: 53
plugins:
- name: etcd
Import-Module BurntToast
$dismiss = New-BTButton -Dismiss
$button = New-BTButton -Content 'More Info' -Arguments 'https://www.google.com'
New-BurntToastNotification -Text "Help Desk Message","Your apps have been upgraded!" -Button $dismiss,$button -AppLogo https://poprepo.portofportland.com/repository/POP/images/PortLogo.png
@rayterrill
rayterrill / vueComponentWithProps.js
Last active January 21, 2019 19:45
VueJS Examples
<html>
<!-- define the binding point for our vue app -->
<div id="app">
<!-- use our component, and bind the prop token to the data token from our root app definition -->
<todo-item v-bind:token="token"></todo-item>
<h1>{{ test() }}</h1>
</div>
<!-- production version, optimized for size and speed -->
Framework Pros Cons
Serverless Framework
ClaudiaJS Looks very simple Doesn't appear to support custom domains (outside of scope of the tool
Terraform