Skip to content

Instantly share code, notes, and snippets.

@danielabar
danielabar / ci.yml
Created July 11, 2021 17:28
Debug Github Actions Medium Post Gist 3
# .github/workflows/ci.yml
name: CI
on: push
env:
RAILS_ENV: test
RACK_ENV: test
DATABASE_HOST: "127.0.0.1"
REDIS_URL: "redis://127.0.0.1"
@danielabar
danielabar / action-error
Created July 5, 2021 21:27
Debug Github Actions Medium Post Gist 2
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
/opt/hostedtoolcache/Ruby/2.7.2/x64/bin/bundle:23:in `load'
/opt/hostedtoolcache/Ruby/2.7.2/x64/bin/bundle:23:in `<main>'
Tasks: TOP => db:reset => db:drop => db:check_protected_environments
(See full trace by running task with --trace)
Error: Process completed with exit code 2.
@danielabar
danielabar / ci.yml
Created July 5, 2021 21:19
Debug Github Actions Medium Post Gist 1
# .github/workflows/ci.yml
name: CI
on: push
env:
RAILS_ENV: test
RACK_ENV: test
DATABASE_HOST: "127.0.0.1"
REDIS_URL: "redis://127.0.0.1"
@danielabar
danielabar / aurelia.protractor.js
Created May 21, 2016 16:44
Extensions to Aurelia Protractor Plugin, adding additional Locators
/* Aurelia Protractor Plugin */
/* eslint-disable no-var, no-console */
function addValueBindLocator() {
by.addLocator('valueBind', function(bindingModel, optParentElement) {
var using = optParentElement || document;
var matches = using.querySelectorAll('*[value\\.bind="' + bindingModel + '"]');
var result;
if (matches.length === 0) {
result = null;
function reportError(error, message) {
message = message || '';
console.error(
'ERROR: ' + message + ' [' + error.toString() + ']\n' +
'\nName:\t\t' + (error.name || '-') +
'\nMessage:\t' + (error.message || '-') +
'\nFile:\t\t\t' + (error.fileName || '-') +
'\nSource:\t\t' + ((error.toSource && error.toSource()) || '-') +
'\nLine #:\t\t' + (error.lineNumber || '-') +
'\nColumn #:\t' + (error.columnNumber || '-') +
@danielabar
danielabar / vagrant.txt
Last active October 23, 2015 00:18
Course notes and commands from TutsPlus: Virtual Machines with Vagrant and Puppet
# https://tutsplus.com/course/virtual-machines-with-vagrant-and-puppet/
# Download and install VirtualBox https://www.virtualbox.org/wiki/Downloads
# Download and install Vagrant http://www.vagrantup.com/downloads.html
# For this lesson, we'll be using VirtualBox as the provider
# add a new box to collection of vagrant boxes
# vagrant box add <name> <location>
vagrant box add precise32 http://files.vagrantup.com/precise32.box