Skip to content

Instantly share code, notes, and snippets.

View jmscholen's full-sized avatar

Jeff Scholen jmscholen

  • IOU Financial
  • Johns Creek
View GitHub Profile
@equivalent
equivalent / README.md
Last active April 8, 2024 03:00
Rails 7 importmaps dropzone.js direct upload ActiveStorage

This is simple implementation of technologies in hobby project of mine built in Rails7 where I need direct upload to S3.

# frozen_string_literal: true
module Aws
# Client for AWS Cognito Identity Provider using Secure Remote Password (SRP).
#
# This code is a direct translation of the Python version found here:
# https://github.com/capless/warrant/blob/ff2e4793d8479e770f2461ef7cbc0c15ee784395/warrant/aws_srp.py
class CognitoSrp
def initialize(username:, password:, pool_id:, client_id:, aws_client:)
@username = username
@esparkman
esparkman / .tmux.conf
Last active February 3, 2020 15:16
Tmuxinator config for Listen360 Ecosystem
###########################
## Configuration
############################
#
# use 256 term for pretty colors
set -g default-terminal "screen-256color"
# increase scroll-back history
set -g history-limit 5000

Vue State Management and Vuex

This is a full-day workshop on architecting state management in Vue. In this workshop, you will learn why you should use Vuex in your Vue application. Through hands-on exercises, you will learn the basics of Vuex like state, actions, mutations, and getters. We will also cover using named modules as well as best practices. If time permits, we may even dive into the new composition api and how we can harness it for state management!

Slides!

https://github.com/shortdiv/vuex-workshop

Before You Arrive

Make sure you can create a new boilerplate Vue application using Vue CLI.

@fjfish
fjfish / models.rb
Last active December 1, 2023 11:20
Automatic generation of rspec model tests and factories for factory girl
class Models
def self.generate what = :model
Rails.application.eager_load!
ActiveRecord::Base.descendants.each do |model|
method(what)[model]
end
true
end
def self.factory model
factory_file_name = "spec/factories/#{model.name.underscore}.rb"
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@huy
huy / Hash.from_xml
Created February 10, 2011 05:29
Convert xml to hash using Nokogiri
# USAGE: Hash.from_xml(YOUR_XML_STRING)require 'rubygems'
require 'nokogiri'
# modified from http://stackoverflow.com/questions/1230741/convert-a-nokogiri-document-to-a-ruby-hash/1231297#123129
7
class Hash
class << self
def from_xml(xml_io)
begin
result = Nokogiri::XML(xml_io)