# Anchor
click_link 'Save'
# Button
click_button 'awesome'
# Both above
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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}) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install pry - form terminal | |
# ruby file_name.rb | |
require 'pry' | |
def hello(*args) | |
# reset base to inside the array | |
arg_base = args[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = "g7fj10jsofo2invwoqnfvoi34rngua8vhqjefoainwekfuvy3nbf".downcase | |
string_count = 0 | |
alphabet =[ | |
"a", | |
"b", | |
"c", | |
"d", | |
"e", | |
"f", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
workout: { // workout table | |
name: "Chest", | |
role: "strength", | |
exercises: [ // exercise table | |
{ | |
name: "Bench press", | |
sets: [ |
NewerOlder