Skip to content

Instantly share code, notes, and snippets.

View wmaciej's full-sized avatar

Maciek Wojcik wmaciej

View GitHub Profile
@wmaciej
wmaciej / raspberry-pi-vpn-router.md
Created January 6, 2021 20:44 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
phantom.exit();
var page = require('webpage').create();
page.open('http://example.com', function() {});
page.evaluate(function() { return document.title; });
@wmaciej
wmaciej / selenium_py_functions.py
Created March 25, 2019 16:52 — forked from ChrisMuir/selenium_py_functions.py
Useful functions for web scraping with Selenium and Chromedriver in Python
# -*- coding: utf-8 -*-
## Collection of useful functions for working with Selenium and Chromedriver
## in Python. These functions are geared toward web scraping.
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.alert import Alert
from selenium.webdriver.support.ui import WebDriverWait