Skip to content

Instantly share code, notes, and snippets.

Gemma Black gemmadlou

Block or report user

Report or block gemmadlou

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
gemmadlou / .autorc
Last active Apr 5, 2020
Auto docker image release
View .autorc
"plugins": [
"afterVersion": "publish"
gemmadlou / .bash_profile
Last active Mar 26, 2020
AWS reassigning IP addresses automatically
View .bash_profile
function renew_aws_ip {
echo "Remove security group rule for $SECURITY_GROUP"
aws ec2 describe-security-groups \
--group-ids $SECURITY_GROUP \
--query "SecurityGroups[0].IpPermissions[*].IpRanges" \
| jq 'flatten | .[] | select(.Description == "'$NAME_OF_RULE'") | .CidrIp ' \
gemmadlou / db-connect-test.php
Created Mar 12, 2020 — forked from M165437/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
View db-connect-test.php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
mysql --defaults-group-suffix=_products --database data_analysis -e "load data local infile 'data/file.csv' into table table_name fields terminated by ',' enclosed by '\"' lines terminated by '\n'"
mysql --defaults-group-suffix=_products --database data_analysis < file.sql
# Dump
mysqldump --defaults-group-suffix=_local_products --column-statistics=0 --no-create-info --set-gtid-purged=OFF --insert-ignore rentr > test.sql
gemmadlou /
Last active Jan 6, 2020

Dev Philosophies - Dream

Making quality software fast.

Trust and autonomy {#trust-and-autonomy}

Trust one another to do the right thing for the right reason. At your company, you are part of a talented tech team. Ideas cannot go to waste, so share and try them out. Feel confident that you have the power to innovate. Encourage others to grow and become better developers.

Work wherever is most comfortable

View artefact
#!/usr/bin/env bash
# Usage
# artefact 1.5.6
rm ../$
(zip -r9 ../$ . -x \*.git\* \*coverage\* \*tests\* \*__tests__\*)
gemmadlou / publish.js
Created Dec 30, 2019
Publishes new release (no branches)
View publish.js
* Publishes new release
* @param {object} inject
* @param {GetLastCommit} inject.getLastCommit
* @param {GetPackage} inject.getPackage
* @param {UpdatePackage} inject.updatePackage
* @param {CommitNewVersion} inject.commitNewVersion
* @param {TagNewVersion} inject.tagNewVersion
* @param {PushCommit} inject.pushCommit
gemmadlou / publish.js
Created Dec 30, 2019
Publishes new release
View publish.js
* Publishes new release
* @param {object} [inject]
* @param {GetLastCommit} [inject.getLastCommit]
* @param {GetPackage} [inject.getPackage]
* @param {UpdatePackage} [inject.updatePackage]
* @param {CommitNewVersion} [inject.commitNewVersion]
* @param {TagNewVersion} [inject.tagNewVersion]
* @param {PushCommit} [inject.pushCommit]
gemmadlou /
Created Dec 18, 2019
Simple artefact creation script
# Simple deploy script for this project
# 1. Zips project. 2. Deploys to S3. It doesn't delete or remove packages.
if ["$1" = ""]; then
echo "$(basename -- $0) <VERSION> Semver (v1.0.0)"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
gemmadlou / lambda.js
Created Dec 18, 2019
Severless lambda port of express js
View lambda.js
const app = require("./app")
const serverless = require('aws-serverless-express')
const server = serverless.createServer(app)
module.exports.handler = (event, context) => {
return serverless.proxy(server, event, context)
You can’t perform that action at this time.