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
/* | |
Node.js, express, oauth example using Twitters API | |
Install Dependencies: | |
npm install express | |
npm install oauth | |
Create App File: | |
Save this file to app.js | |
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
=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 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
nano /usr/share/applications/name.desktop | |
# PASTE the following /usr/share/applications/name.desktop | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=name | |
Comment=comment | |
Exec=name_shortcut | |
Icon=/path/folder/icon.png |
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
import javax.swing.JFrame; | |
import java.awt.Dimension; | |
import java.awt.Toolkit; | |
final JFrame frame = new JFrame(); | |
Dimension fullscreen = Toolkit.getDefaultToolkit().getScreenSize(); | |
fullscreen.width -= 100; | |
fullscreen.height -= 200; | |
frame.setBounds(0,0,fullscreen.width,fullscreen.height); |