Skip to content

Instantly share code, notes, and snippets.

View jmfontaine's full-sized avatar

Jean-Marc Fontaine jmfontaine

View GitHub Profile
@jmfontaine
jmfontaine / bootstrap.sh
Last active December 15, 2023 23:40
Machine Bootstrap
#!/bin/bash
function info() {
tput setaf 2
echo -e "$@"
tput sgr0
}
info "Install Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
resource "random_string" "random" {
length = 16
special = true
override_special = "/@£$"
}
@jmfontaine
jmfontaine / TestOutputMap.txt
Last active October 21, 2018 21:30
Test Output for Terratest PR #180
go test -run TestOutputMap
TestOutputMap 2018-10-21T17:26:37-04:00 retry.go:69: Running terraform [init -upgrade=false]
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:52: Running command terraform with args [init -upgrade=false]
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:96:
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:96: Terraform has been successfully initialized!
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:96:
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:96: You may now begin working with Terraform. Try running "terraform plan" to see
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:96: any changes that are required for your infrastructure. All Terraform commands
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:96: should now work.
TestOutputMap 2018-10-21T17:26:37-04:00 command.go:96:

Keybase proof

I hereby claim:

  • I am jmfontaine on github.
  • I am jmfontaine (https://keybase.io/jmfontaine) on keybase.
  • I have a public key whose fingerprint is D017 A908 C209 26E5 4499 55F2 7B0E 0027 8749 4339

To claim this, I am signing this object:

Verifying that +jmfontaine is my blockchain ID. https://onename.com/jmfontaine
@jmfontaine
jmfontaine / gist:4483544
Last active December 10, 2015 19:48
PHP && operator can break foreach loops Edit: I was wrong. There is no break here.
<?php
function isOk($message) {
echo $message . PHP_EOL;
return 'Error' !== $message;
}
$messages = array('Info', 'Error', 'Info');
$isOk = true;
@jmfontaine
jmfontaine / gist:2958652
Created June 20, 2012 07:37
Mixing libraries
<?php
require 'lib/LibraryA/AwesomeClass.php'
require 'lib/LibraryB/classes/crappy_old_class.php';
$objectA = new AwesomeClass();
$objectA->someMethod();
$objectB = new crappy_old_class();
$objectB->some_other_method();