Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Doherty bangpound

View GitHub Profile
View vault-token-helper.sh
#!/usr/bin/env bash
# Vault Token helper for the Mac OS X Keychain.
#
# Vault allows an external programs to be configured as a token helper
# that can get, store, and erase tokens on behalf of the Vault client.
#
# see https://www.vaultproject.io/docs/commands/token-helper.html
#
# To use this script, make it executable and set your ~/.vault file to
@bangpound
bangpound / vault-token-helper.sh
Created Sep 9, 2018
Vault Token helper for the Linux key retention service
View vault-token-helper.sh
#!/usr/bin/env bash
# Vault Token helper for the Linux key retention service.
#
# Since version 2.6, the Linux kernel has included a efficiently store
# authentication data on a per thread, per process, per user, or per session
# bases.
#
# Linux Key Management Utilities (keyutils) provides `keyctl` to control
# the facility from the shell.
@bangpound
bangpound / vault-iam-auth.php
Last active Mar 18, 2021
AWS IAM authentication to Vault with AWS SDK v3 on PHP
View vault-iam-auth.php
<?php
// Use the AWS security token service's GetCallerIdentity command
// to produce a request that allows Vault to identify the instance
// that wants to authenticate.
//
// @see https://gist.github.com/joelthompson/378cbe449d541debf771f5a6a171c5ed
$sts = new \Aws\Sts\StsClient([
'region' => 'us-east-1',
@bangpound
bangpound / README.md
Last active Nov 5, 2017
INI File from Ansible for use anywhere
View README.md

INI File

For example:

  • ini_file.py php.ini --section PHP --option memory_limit --value 256M
View -
diff --git a/app/components/ac-edit-group-modal/permissions/component.js b/app/components/ac-edit-group-modal/permissions/component.js
index ea3e7f4b0..c25dcd786 100644
--- a/app/components/ac-edit-group-modal/permissions/component.js
+++ b/app/components/ac-edit-group-modal/permissions/component.js
@@ -24,7 +24,7 @@ export default Component.extend({
*/
permissionCheckboxToggled: function(permission) {
this.set('group.' + permission.get('slug'), !permission.get('checked'));
- permission.set('checked', !permission.get('checked'));
+ permission.set('checked', !permission.get('checked'));
View compile.sh
#!/bin/bash
[ -d ac_global/jsc ] || mkdir ac_global/jsc
[ -d admin/jsc ] || mkdir admin/jsc
closure_compile() {
temp="${1%\'}"
temp="${temp#\'}"
list=()
js=$(jq --raw-output '.["'"$temp"'"] | @sh' < tools/compilejs.json)
View Vagrantfile
# vim: set ft=ruby:
# port on VM => port on host machine
port_mapping = {
80 => 8080,
443 => 4343,
1004 => 8081,
9200 => 9201,
}
View README.md

RoboFile for ActiveCampaign

  1. composer global require consolidation/robo or download robo.phar from http://robo.li/ and put it in your $PATH.
  2. Copy the RoboFile.php above so that it is a sibling of dev
  3. Modify the properties at the top like the $originPrefix and $allRepos.

Some things

  • robo git:update to add the upstream remote to all of your repositories.
View -
diff --git a/app/Pipes/Http/SaveConnectionsPipe.php b/app/Pipes/Http/SaveConnectionsPipe.php
index 3f54a0e..700935f 100644
--- a/app/Pipes/Http/SaveConnectionsPipe.php
+++ b/app/Pipes/Http/SaveConnectionsPipe.php
@@ -12,7 +12,7 @@ class SaveConnectionsPipe extends HttpPipe
/**
* The connection repository
*
- * @var object
+ * @var ConnectionRepository
View bower-libraries.patch
diff --git a/libraries.module b/libraries.module
index 4827525..d4ba4dc 100644
--- a/libraries.module
+++ b/libraries.module
@@ -86,6 +86,7 @@ function libraries_get_libraries() {
// profile, installation profiles may want to place libraries into a
// 'libraries' directory.
$searchdir[] = "$profile/libraries";
+ $searchdir[] = "$profile/bower_components";