Skip to content

Instantly share code, notes, and snippets.

View jay-snee's full-sized avatar

Jay Snee jay-snee

  • Accenture
  • Newcastle, UK
View GitHub Profile
@jay-snee
jay-snee / run-rspec.yml
Created March 11, 2020 20:03
GitHub Actions workflow to install Ruby/Redis/Postgresql, build a Ruby app (with gem cache) and then run then Rspec with final step to merge onto 'deploy' branch upon successful completion.
name: run rspec
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
<?php
class UserExporter {
function export_account($user) {
$remote = 'https://my-lovely-endpoint.com';
$data = array(
'user' => array(
@jay-snee
jay-snee / mixpanel_sessions_controller.rb
Created May 4, 2016 07:25
Dead simple Mixpanel login/logout tracking for Devise Sessions Controllers
class Users::SessionsController < Devise::SessionsController
before_action :set_tracker
# POST /resource/sign_in
def create
super
@tracker.people.set(current_user.id, {
"$name" => current_user.name,
"$email" => current_user.email,