Skip to content

Instantly share code, notes, and snippets.

💭
@proxyco - The Human Protocol, your identity for everything

Henrik Hussfelt hussfelt

💭
@proxyco - The Human Protocol, your identity for everything
Block or report user

Report or block hussfelt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hussfelt
hussfelt / README.md
Created Oct 15, 2018
Use Terraform and Lambda to automatically purge old IAM user passwords and access keys
View README.md

Purge IAM secrets

This terraform module and lambda will remove passwords and secrets that have been unused for too long.

Usage

Put the files in a module folder, for example modules/purge-iam-secrets Use module like this within your terraform plan:

@hussfelt
hussfelt / README.md
Last active Sep 12, 2019
AWS and Terraform: Simplest redirect possible for redirecting traffic from one domain to another
View README.md

AWS and Terraform site redirect

Using example.com as the input domain, this module will:

  • Create a Route53 zone for example.com
  • Create a bucket named example.com
  • Create a bucket named www.example.com
  • Create a Route53 A record example.com for the static website bucket of example.com
  • Create a Route53 A record www.example.com for the static website bucket of www.example.com
@hussfelt
hussfelt / README.md
Last active Sep 12, 2019
How to configure ECS EC2 instances to authenticate to JFrog Artifactory Docker Registry
View README.md

How to configure ECS EC2 instances to authenticate to JFrog Artifactory Docker Registry

The JFrog documentation is lacking on how to do this in a proper way, expecting to use the normal procedures for logging into docker and not in an automated way. This gets even worse if you try and configure your task to authenticate to a private registry - which does not seem to be possible.

The solution is to adjust your user-data, preferably storing your config and key in Secrets Manager.

Putting the config into Secret Manager:

aws secretsmanager update-secret --secret-id artifactory --region us-west-1 --secret-string '{"https://companyname-repo-virtual.jfrog.io": {"auth": "AUTHKEY_FROM_SETMEUP","email": "EMAIL_FROM_SETMEUP"}}'
View keybase.md

Keybase proof

I hereby claim:

  • I am hussfelt on github.
  • I am hussfelt (https://keybase.io/hussfelt) on keybase.
  • I have a public key ASACMdnwf32QEUF_xGwRo3zNswIMoUAoyBPuzZm0jGAwsAo

To claim this, I am signing this object:

@hussfelt
hussfelt / example_serializer.js
Created Aug 17, 2015
Implementation of the new rest-serializer converting data to JSONApi 2.0
View example_serializer.js
import DS from 'ember-data';
import rest_serializer from 'app/mixins/serializers/rest';
export default DS.RESTSerializer.extend(rest_serializer, {
/**
* [normalizeSingleResponse description]
* @param {[type]} store [description]
* @param {[type]} primaryModelClass [description]
* @param {[type]} payload [description]
@hussfelt
hussfelt / gist:6f4d33a68206c30a9d18
Last active Aug 29, 2015 — forked from Dhaulagiri/gist:cf5787663d9f93e99d05
Ember Data 2.0 JSONAPISerializer
View gist:6f4d33a68206c30a9d18
import DS from 'ember-data';
import Ember from 'ember';
export default DS.JSONAPISerializer.extend({
normalizeArrayResponse: function(store, primaryModelClass, payload, id, requestType) {
var data = {},
extracted = [],
root = 'data',
type = Ember.String.pluralize(primaryModelClass.modelName);
@hussfelt
hussfelt / gist:911c58fd668ba422b688
Last active Aug 29, 2015 — forked from kjunggithub/gist:8330157
git hubflow cheaetsheet
View gist:911c58fd668ba422b688

Git HubFlow Cheat Sheet

Preparing the repository

Create the repository on GitHub/Bitbucket. Once created, clone the created repository to your local machine using:

git clone git@github.com:username/repository.git

CD into the repository folder and run the init command to enable to hub flow tools:

cd repo_name
@hussfelt
hussfelt / README.md
Last active May 20, 2019
Dashing widget to display an iframe with specified src
View README.md

dashing-iframe

IFrame plugin for dashing

Description

Dashing widget to display an iframe with specified src

Installation

Create the folder iframe in the /widgets/ directory. Put the files iframe.coffee, iframe.html and iframe.scss in that folder.

View README.md

Description

A Dashing widget to show a Google Visualizations Gauge on a dashboard.

Installation

Copy the google_gauge.coffee, google_gauge.html and google_gauge.scss file to into /widgets/google_gauge directory.

Add the following to the dashboard layout file:

View keybase.md

Keybase proof

I hereby claim:

  • I am hussfelt on github.
  • I am hussfelt (https://keybase.io/hussfelt) on keybase.
  • I have a public key whose fingerprint is 91F4 D3C0 B19E 314F 9030 58C8 A5B9 D303 A6A9 4D1A

To claim this, I am signing this object:

You can’t perform that action at this time.