Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am awolski on github.
  • I am awolski (https://keybase.io/awolski) on keybase.
  • I have a public key ASB9EXqo1-oFFlmzHZ9Afzj9UH5wxgfgtTQ85jktd8s4Ggo

To claim this, I am signing this object:

vpc_id = "vpc-6ece3507"
az_names = [ "eu-west-2a", "eu-west-2b", "eu-west-2c" ]
db_subnets = [ "10.12.220.0/24", "10.12.221.0/24", "10.12.222.0/24" ]
db_instance_class = "db.t2.micro"
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "eu-west-1",
@awolski
awolski / Entrypoint.groovy
Created August 11, 2017 07:00
Import Stormpath export users into Auth0
import com.auth0.client.mgmt.ManagementAPI
import com.auth0.exception.APIException
import com.auth0.exception.Auth0Exception
import com.auth0.json.mgmt.users.User
import com.auth0.net.Request
import com.mashape.unirest.http.HttpResponse
import com.mashape.unirest.http.Unirest
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
@awolski
awolski / main.css
Last active September 28, 2017 08:43
FreeAgent Invoice Theme
#invoice-amount {
max-width: 100%;
width: 100%
}
#invoice-amount td.description_td,
#invoice #comments {
overflow-wrap: break-word;
word-break: break-word;
word-wrap: break-word;
width: 100%
@awolski
awolski / add-github-repos-to-team.md
Last active March 2, 2017 12:17
Add all repositories to a team in GitHub

Procedure to add all GitHub repositories to a Team

Requires httpie and jq

  1. First export variables and credentials to the environment:
export GH_ORG=your_org
export GH_TOKEN=personal_access_token
export GH_PERMISSION=admin|push|pull
@awolski
awolski / gist:889d0050fed4a4644f25e27015476973
Created January 18, 2017 12:35
Count the number of contributions on a (small) GitHub repository using the GitHub API
http "https://api.github.com/repos/<user|org>/<repo>/contributors" "Authorization: token $GH_TOKEN" | jq '[.[].contributions] | add'
@awolski
awolski / extract-semantic-version.sh
Last active September 14, 2016 15:16
Extract package name and version from node tgz file
echo "Extract semantic version"
echo "/tmp/modules/package-name-0.57.2.tgz" | sed -r 's/.*-([0-9]+\.[0-9]+\.[0-9]+).tgz/\1/'
echo "Extract module name"
echo "/tmp/modules/package-name-0.57.2.tgz" | basename $(sed -r 's/(.*)-([0-9]+\.[0-9]+\.[0-9]+).tgz/\1/')
@awolski
awolski / github-repos-pages.sh
Created July 25, 2016 21:47
Getting number of pages of GitHub repos using the GitHub API and jq
pages=$(curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/orgs/$ORG/repos | grep Link: | sed 's/.*page=\(.\)>; rel="last".*/\1/')
@awolski
awolski / post-checkout
Created July 20, 2016 15:01
post-checkout git hook
exec echo "VJS_TAG=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)" > .env