Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
This file contains 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains 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
module ImagesHelper | |
# Example usage: | |
# | |
# image_set_tag_3x "foo_1x.png", alt: "foo" | |
# | |
# Will assume there is a 2x and 3x version and provide those automagically. | |
# | |
# Based on https://gist.github.com/mrreynolds/4fc71c8d09646567111f | |
def image_set_tag_3x(source, options = {}) | |
srcset = [ 2, 3 ].map { |num| |
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
This file contains 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
build: | |
steps: | |
- script: | |
name: install yarn | |
code: npm install -g yarn | |
- script: | |
name: report yarn version | |
code: yarn --version | |
- script: | |
name: set yarn cache |
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
Let's put an end to datepicker suffering! Follow this steps to have your shiny new datepicker working in no time! (and remind yourselves of JS plugins in Rails)
Note: We recommend using Bootstrap Datepicker (try your own luck with anything different and remember, jQuery-UI's datepicker sucks, don't use it). These are the only three links you need:
This file contains 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
import { useEffect, useState } from "react"; | |
class EventBus<T> { | |
_handlers: Set<(t: T) => void> = new Set(); | |
subscribe(handler: (t: T) => void) { | |
this._handlers.add(handler); | |
} | |
unsubscribe(handler: (t: T) => void) { | |
this._handlers.delete(handler); | |
} |
OlderNewer