Skip to content

Instantly share code, notes, and snippets.

View finferflu's full-sized avatar
🏠
Working from home

Emmanuele finferflu

🏠
Working from home
  • Manchester, UK
View GitHub Profile
@finferflu
finferflu / tf_output.txt
Created June 17, 2019 08:42
Terraform output while modifying a CloudFront distribution
2019-06-17T08:13:55.273Z [DEBUG] plugin.terraform-provider-aws_v2.15.0_x4: 2019/06/17 08:13:55 [DEBUG] [aws-sdk-go] DEBUG: Retrying Request cloudfront/UpdateDistribution2018_11_05, attempt 13
2019-06-17T08:13:55.274Z [DEBUG] plugin.terraform-provider-aws_v2.15.0_x4: 2019/06/17 08:13:55 [DEBUG] [aws-sdk-go] DEBUG: Request cloudfront/UpdateDistribution2018_11_05 Details:
2019-06-17T08:13:55.274Z [DEBUG] plugin.terraform-provider-aws_v2.15.0_x4: ---[ REQUEST POST-SIGN ]-----------------------------
2019-06-17T08:13:55.274Z [DEBUG] plugin.terraform-provider-aws_v2.15.0_x4: PUT /2018-11-05/distribution/E1PUVB1D6VRBGW/config HTTP/1.1
2019-06-17T08:13:55.274Z [DEBUG] plugin.terraform-provider-aws_v2.15.0_x4: Host: cloudfront.amazonaws.com
2019-06-17T08:13:55.274Z [DEBUG] plugin.terraform-provider-aws_v2.15.0_x4: User-Agent: aws-sdk-go/1.19.49 (go1.12.5; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.1
2019-06-17T08:13:55.274Z [DEBUG] plugin.terraform-provider-aws_v2.15.0_x4: Content-Length: 3854
2019-06-17T08:13
import Ember from 'ember';
export default Ember.Component.extend({
title: '',
init () {
this._super(...arguments)
let type = this.get('type')
this.set('title', type.charAt(0).toUpperCase() + type.slice(1))
}
@finferflu
finferflu / pluralise.js
Created July 21, 2017 21:13
Pluralise helper for Ember 2.x
// app/helpers/pluralise.js
import Ember from 'ember'
export function pluralise ([number, singular, plural]) {
console.log(singular)
Ember.assert('{{pluralise}} helper requires at least two arguments, none provided.', number)
Ember.assert('{{pluralise}} helper requires at least two arguments, only one provided.', singular)
var pluralWord = plural || singular + 's'
return (number === 1) ? singular : pluralWord

Keybase proof

I hereby claim:

  • I am finferflu on github.
  • I am finferflu (https://keybase.io/finferflu) on keybase.
  • I have a public key whose fingerprint is 20D0 F730 7408 494D 6B16 B5D6 0BD8 562B 2BE6 C83F

To claim this, I am signing this object:

@finferflu
finferflu / gist:e513ac90b18ebbd3cc10
Last active October 23, 2015 19:05
Sample POST to Slack API method chat.postMessage
$payload = array(
'token' => 'xxxx-xxxxxxxxx-xxxx',
'channel => 'C1234567890',
'attachments' => array(array(
'text' => "This is my post body",
'fallback' => "This is the fallback"
)));
$data_str = json_encode($payload);