Skip to content

Instantly share code, notes, and snippets.

View mklemme's full-sized avatar
🤓
Always be creating

Myk Klemme mklemme

🤓
Always be creating
View GitHub Profile
@mklemme
mklemme / Capybara.md
Created January 3, 2018 22:57 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@mklemme
mklemme / (1) firebaseMiddleware.js
Created June 13, 2017 03:29 — forked from markopavlovic/(1) firebaseMiddleware.js
Firebase Middleware on Redux - Follow up on "react-redux-universal-hot-example" (Firebase login example)
/**
* @path src/redux/middleware
*
* Extract from clientMiddleware example in order to showcase
* the difference and help in understanding the same.
*
* @diff - Differences with "react-redux-universal-hot-example"
*/
export default function firebaseMiddleware(fireRef) {
return ({dispatch, getState}) => {
@mklemme
mklemme / it.coffee
Created May 9, 2016 18:49 — forked from technicalpickles/it.coffee
hubot script example with test
# Description:
# Get help from @yourorg/it for your information technology problems. Oh by the way.... Your Welcome.
#
# Commands:
# hubot it me <problem> - get help from @yourorg/it about your information technology <problem>
module.exports = (robot) ->
robot.respond /it(?: me)?(?: (.*))?/i, (msg) ->
problem = msg.match[1]
@mklemme
mklemme / gist:0635e6b030eec98c7738
Created October 16, 2015 20:38 — forked from jlxw/gist:3357795
Monkey patch to rate limit Rails Exception Notification / Notifier
ExceptionNotifier::Notifier.class_eval do
#https://github.com/smartinez87/exception_notification/blob/master/lib/exception_notifier/notifier.rb
def self.exception_notification(*args)
message = super
_limit = 5.minutes.ago
@@last_notification||=_limit
if @@last_notification > _limit
Rails.logger.info "ExceptionNotifier rate limit triggered, #{ExceptionNotifier::Notifier.deliveries.size} notifications limited."
message.delivery_method :test
<!-- Normal -->
<a href="/subscribe" class="button">Subscribe</a>
<!-- CTA -->
<a href="/subscribe" class="button button-stretch">Subscribe</a>
<!-- CTA -->
<a href="/subscribe" class="button button-secondary">Subscribe</a>
@mklemme
mklemme / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mklemme
mklemme / Readme
Created January 12, 2015 22:47
Generate a random string
## Random string generator
This solution generates a string of easily readable characters for activation codes; I didn't want people confusing 8 with B, 1 with I, 0 with O, L with 1, etc.
# gem install pry - form terminal
# ruby file_name.rb
require 'pry'
def hello(*args)
# reset base to inside the array
arg_base = args[0]
string = "g7fj10jsofo2invwoqnfvoi34rngua8vhqjefoainwekfuvy3nbf".downcase
string_count = 0
alphabet =[
"a",
"b",
"c",
"d",
"e",
"f",
{
workout: { // workout table
name: "Chest",
role: "strength",
exercises: [ // exercise table
{
name: "Bench press",
sets: [