Skip to content

Instantly share code, notes, and snippets.

View jcreager's full-sized avatar

Joe jcreager

View GitHub Profile
2020/07/25 14:12:53 [INFO] Terraform version: 0.12.29
2020/07/25 14:12:53 [INFO] Go runtime version: go1.13.14
2020/07/25 14:12:53 [INFO] CLI args: []string{"/usr/local/bin/terraform", "--version"}
2020/07/25 14:12:53 [DEBUG] Attempting to open CLI config file: /Users/joe/.terraformrc
2020/07/25 14:12:53 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/07/25 14:12:53 [INFO] CLI command args: []string{"version", "--version"}
2020/07/25 14:12:53 [DEBUG] checking for provider in "."
2020/07/25 14:12:53 [DEBUG] checking for provider in "/usr/local/bin"
2020/07/25 14:12:53 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
@jcreager
jcreager / fibonacci.go
Created November 9, 2017 02:05
A Tour of Go - Exercise: Fibonacci closure
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
x, y, z := 0, 1, 0
return func() int {
z, x, y = x, y, x+y
@jcreager
jcreager / wordcount.go
Created November 7, 2017 16:22
A Tour of Go - Exercise: Maps
package main
import (
"golang.org/x/tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
words := strings.Fields(s)
var count map[string]int
@jcreager
jcreager / helloWorld.c
Created May 3, 2016 04:39
Hello World! in C
#include<stdio.h>
main()
{
printf("Hello World");
}
; ----------------------------------------------------------------------------------------
;Source: http://cs.lmu.edu/~ray/notes/x86assembly/
;Writes "Hello, World" to the console using only system calls. Runs on 64-bit Linux only.
; To assemble and run:
;
; nasm -felf64 hello.asm && ld hello.o && ./a.out
; ----------------------------------------------------------------------------------------
global _start
@jcreager
jcreager / helloWorld.sh
Created May 2, 2016 19:44
Print Hello World Node
$node helloWorld.js
@jcreager
jcreager / hellWorld.cpp
Created May 2, 2016 05:39
Print Hello World in c++
#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}
@jcreager
jcreager / helloWorld.java
Created May 2, 2016 05:35
Print Hello World! in Java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
@jcreager
jcreager / helloWorld.py
Created May 2, 2016 05:32
Print Hello World in Python
print 'Hello World!'
@jcreager
jcreager / helloWorld.php
Last active May 2, 2016 05:31
Hello World! in PHP
<?php
print 'Hello World!'
//or
echo 'Hello World!'
?>