Skip to content

Instantly share code, notes, and snippets.

View hogihung's full-sized avatar

John F. Hogarty hogihung

  • Left Foot Media, Inc.
  • Jacksonville, FL
View GitHub Profile
require 'csv'
$VERBOSE = nil
namespace :user do
desc "Display Help for managing users"
task :help do
puts "Below are examples of how to use the user related rake tasks:"
puts " rake user:create_user['John Q. User','john.q.user@email.com','mypassword']"
puts " rake user:delete_user['John Q. User','john.q.user@bobots.com']"
@hogihung
hogihung / remote_connect.yml
Last active November 22, 2022 13:05
Using Tmuxinator with Tmux to remotely connect to several hosts via ssh using the even vertical pane layout
# ~/.tmuxinator/remote_connect.yml
# more info on tmuxinator: https://github.com/tmuxinator/tmuxinator
name: remote
root: ~/path/to/your_project/dir
windows:
- local: ls -la
- remote:
layout: even-vertical
@hogihung
hogihung / cuc_scenario_outline_example.feature
Last active May 3, 2016 13:07
Cucumber Scenario Outline Example
And I successfully change the following the configuration values, one at a time:
| id | input |
| activity-requirement | 80 |
Then I see config has the following input values
| id | input |
| activity-requirement | 80 |
STEP DEFS:
When /^I successfully change the following the configuration values, one at a time:$/ do |table|
#!/usr/bin/perl
#
# John Hogarty
#
# Description: This is a test script to test components of DAO, including data
# related retreival via a DB for Baytechs.
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# John Hogarty
#
# Description: Class to process data related elements of a baytech and any
# devices that are connected to a baytech.
#
#-----------------------------------------------------------------------------
package OMX::Data::DB::Baytech;
use strict;
#-----------------------------------------------------------------------------
# John Hogarty
#
# Description: Base class for database backed data related sub-classes
#
#-----------------------------------------------------------------------------
package OMX::Data::DB::Base;
use strict;
use warnings FATAL => qw(all);
#-----------------------------------------------------------------------------
# John Hogarty
#
# Description: Data Access Orchestrator class
#
#-----------------------------------------------------------------------------
package OMX::Data::DAO;
use strict;
use warnings FATAL => qw(all);
➜ RoR git clone https://github.com/hashicorp/otto-getting-started.git
Cloning into 'otto-getting-started'...
remote: Counting objects: 34, done.
remote: Total 34 (delta 0), reused 0 (delta 0), pack-reused 34
Unpacking objects: 100% (34/34), done.
Checking connectivity... done.
➜ RoR cd otto-getting-started
➜ otto-getting-started git:(master) otto compile
==> Loading Appfile...
==> No Appfile found! Detecting project information...
@hogihung
hogihung / postgres_notes.txt
Created January 19, 2016 16:44
Scratch notes for setting up a user account in Postgres (Ubuntu Server)
================================================================================
Postgres Notes
================================================================================
1. Configure a Postgresql user account and database
➜ ~ sudo -i -u postgres
[sudo] password for jfhogarty:
postgres@LeftFootMedia:~$ psql
psql (9.3.10)
Type "help" for help.
@hogihung
hogihung / capybara.rb
Last active August 29, 2015 14:20
Sample Capybara file for use with cucumber/selenium/poltergeist.
require 'capybara'
require 'capybara/cucumber'
require 'selenium-webdriver'
require 'capybara/poltergeist'
require 'open-uri'
require 'pry'
require 'pathname'
if ENV['SELENIUM']