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
Rails scaffolding types | |
These types are valid since Rails version 2: | |
string | |
text (long text, up to 64k, often used for text areas) | |
datetime | |
date | |
integer | |
binary | |
boolean |
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
SELECT item.item0 FROM | |
(SELECT item0 FROM situationalItems WHERE type = 1 | |
AND build IN (SELECT id FROM build WHERE champion = ? AND mode = ? AND role = ? AND position = ?) UNION ALL | |
SELECT item1 FROM situationalItems WHERE type = 1 | |
AND build IN (SELECT id FROM build WHERE champion = ? AND mode = ? AND role = ? AND position = ?) UNION ALL | |
SELECT item2 FROM situationalItems WHERE type = 1 | |
AND build IN (SELECT id FROM build WHERE champion = ? AND mode = ? AND role = ? AND position = ?)) | |
AS item GROUP BY item.item0 ORDER BY COUNT(*) DESC LIMIT 3 |
L'intra d'Epitech (intra.epitech.eu
) possède une API assez vaste mais malheureusement non documentée.
J'ai regroupé ici un certains nombres d'urls concernant cette API.
First up, let's make Sublime Text 2 available from the command line in terminal, by creating a link to subl
which is the launcher from terminal:
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
(added bonus of this approach is when you upgrade to ST3 or change text editor, you can just redirect the symlink).
If there's any chance that bash
doesn't check usr/local/bin
then use [Launch Sublime Text 2 from Mac OSX Terminal] for more detailed instructions on how to make this happen.
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
class MyJob < ActiveJob::Base | |
queue_as :urgent | |
rescue_from(NoResultsError) do | |
retry_job wait: 5.minutes, queue: :default | |
end | |
def perform(*args) | |
MyService.call(*args) | |
end |