Skip to content

Instantly share code, notes, and snippets.

View AlainPilon's full-sized avatar

Alain Pilon AlainPilon

  • Montreal, Canada
View GitHub Profile
@AlainPilon
AlainPilon / phantom.py
Last active January 5, 2018 16:14 — forked from jsok/phantom.py
Use PhantomJS and Python Selenium bindings to take screenshots of websites.
from io import BytesIO
from selenium import webdriver
from PIL import Image
driver = webdriver.PhantomJS()
driver.set_window_size(1366, 728) # optional
driver.get('http://google.com')
driver.save_screenshot('screen_hires.png')
@AlainPilon
AlainPilon / tmux.md
Last active August 29, 2015 14:11 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

=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')