Skip to content

Instantly share code, notes, and snippets.

View HughxDev's full-sized avatar

Hugh Guiney HughxDev

View GitHub Profile
@HughxDev
HughxDev / xvfb_screen_recording.py
Created December 30, 2017 19:57 — forked from t-io/xvfb_screen_recording.py
ScreenRecording xvfb
from selenium import webdriver
import sys, getopt, time, subprocess, shlex
from xvfbwrapper import Xvfb
def run():
print('Sreencast website animation')
xvfb = Xvfb(width=1280, height=720, colordepth=24)
xvfb.start()
@HughxDev
HughxDev / cssify.js
Created August 11, 2012 02:26 — forked from Dither/cssify.js
Convert XPath to CSS selector
// JavaScript function for converting simple XPath to CSS selector.
// Ported by Dither from [cssify](https://github.com/santiycr/cssify)
// Example: `cssify('//div[@id="girl"][2]/span[@class="body"]//a[contains(@class, "sexy")]//img[1]')`
var sub_regexes = {
"tag": "([a-zA-Z][a-zA-Z0-9]{0,10}|\\*)",
"attribute": "[.a-zA-Z_:][-\\w:.]*(\\(\\))?)",
"value": "\\s*[\\w/:][-/\\w\\s,:;.]*"
};