Skip to content

Instantly share code, notes, and snippets.

View nickmoorman's full-sized avatar

Nick (Moorman) Sawyer nickmoorman

  • Etsy
  • Portland, OR
View GitHub Profile
@nickmoorman
nickmoorman / 01-migrate_test.sh
Created October 17, 2019 16:12
Support files for terraform-providers/terraform-provider-google PR
#!/usr/bin/env bash
GCP_PROJECT="<REDACTED>"
function write_provider {
version=$1
cat > provider.tf << EOF
provider "google" {
project = "$GCP_PROJECT"
@nickmoorman
nickmoorman / 01-terraform-plan-debug.log
Created October 17, 2019 16:05
Support files for terraform-providers/terraform-provider-google bug report
2019/10/07 12:28:41 [INFO] Terraform version: 0.11.14
2019/10/07 12:28:41 [INFO] Go runtime version: go1.12.5
2019/10/07 12:28:41 [INFO] CLI args: []string{"/usr/local/Cellar/[email protected]/0.11.14/bin/terraform", "plan"}
2019/10/07 12:28:41 [DEBUG] Attempting to open CLI config file: /Users/nsawyer/.terraformrc
2019/10/07 12:28:41 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/10/07 12:28:41 [INFO] CLI command args: []string{"plan"}
2019/10/07 12:28:41 [INFO] command: backend initialized: *gcs.Backend
2019/10/07 12:28:41 [DEBUG] checking for provider in "."
2019/10/07 12:28:41 [DEBUG] checking for provider in "/usr/local/Cellar/[email protected]/0.11.14/bin"
2019/10/07 12:28:41 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64"
@nickmoorman
nickmoorman / gist:0a9b49e8d8344fa4fde2
Created April 6, 2015 15:54
Because I just HAD to see for myself...
$ cat *.java
public class ThisTest1 {
private String foo;
public ThisTest1() {
this.foo = "some string";
}
}
public class ThisTest2 {
private String foo;
@nickmoorman
nickmoorman / Application.scala
Created August 19, 2014 18:53
Creating a JSON response from a map with Play Scala 2.3.x
package controllers
import scala.collection.mutable.{Map => MMap}
import play.api.libs.json.{Json, JsValue}
import play.api.mvc._
object Application extends Controller {
def index = Action {
// Define array and a function to return the max of two numbers
val arr = Array(1, 2, 3, 4, 5)
def getMax(a :Int, b :Int) : Int = if (a > b) a else b
// Use foldLeft to find the max in the array
val max1 = (Integer.MIN_VALUE /: arr) { (large, elem) => getMax(large, elem) }
// No need to use sensible variable names, just use underscores!
val max2 = (Integer.MIN_VALUE /: arr) { getMax(_, _) }
extends layout
block content
div(id="debt-solver-app")
header
h1= title
p Welcome to #{title}
p This app was written to help solve the all-too-familiar problem of paying off one's debt.
section(id="main")
{
"totalTweets": 26,
"tweetsPerMinute": {
"all": 0.0009084556254367575,
"tr": 0.0008385744234800839,
"zd": 0.0002445842068483578
},
"tweetsPerBrand": {
"tr": 24,
"zd": 7
{
id: 428977109894430700,
id_str: '428977109894430721',
text: 'No such pipe, or this pipe has been deleted',
source: '<a href="http://goo.gl/IQ4Cjt" rel="nofollow">twitfeed сервер1</a>',
truncated: false,
in_reply_to_status_id: null,
in_reply_to_status_id_str: null,
in_reply_to_user_id: null,
in_reply_to_user_id_str: null,
## Environment Variables
## =====================
# Enable Git completions
source ${HOME}/.gitcompletion.bash
# Executables for local PHP 5.4 development stack
PATH=/usr/local/sbin:/usr/local/apache2/bin:/usr/local/bin:/usr/local/mysql/bin:${PATH}
PATH="$(brew --prefix php54)/bin:$PATH"
moormann@moormannmbpx7:~/dev/git/stash/techrepublic (master)$ composer update fly/
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package symfony/symfony == 2.1.9999999.9999999-dev could not be found.
Problem 2
- The requested package symfony/assetic-bundle == 9999999-dev could not be found.
Problem 3