As websites become more JavaScript heavy, it's harder to automate things like screenshotting for archival purposes. I've seen examples and suggestions to use PhantomJS for visual testing/archiving of websites, but have run into issues such as the non-rendering of webfonts. I've never tried out Selenium until today...and while I'm not thinking about performance implications yet, Selenium seems far more accurate than PhantomJS...which makes sense since it actually opens a real browser. And it's not too hard to script to do complex interactions: here's an [example of how to log in to Twitter, write a tweet, upload an image, and send a tweet via Selenium and DOM element selection](https://gist.github.com/dannguyen/8a6fa49253c1d6a0eb92
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
| #!/usr/bin/python | |
| import hmac, struct, time, base64, hashlib # for totp generation | |
| import re, sys, subprocess # for general stuff | |
| from getopt import getopt, GetoptError # pretending to be easy-to-use | |
| # | |
| # gtb - Google(auth) + Tunnelblick | |
| # |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) 2015 Martin Raspaud | |
| # Author(s): | |
| # Martin Raspaud <[email protected]> | |
| # This program is free software: you can redistribute it and/or modify |
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
| #! /usr/bin/env python2 | |
| # Small test client for rtl_tcp | |
| # Simeon Miteff <[email protected]> | |
| # Thu Sep 27 09:28:55 SAST 2012 | |
| import socket | |
| import struct | |
| import time | |
| SET_FREQUENCY = 0x01 | |
| SET_SAMPLERATE = 0x02 |
This my receipe for installing a complete nodejs server on FreeBSD 10. The parameters used in this configuration are for a very small private server that I use for demo purpose only, so for a production server, you should somehow set the limits in pair with your ressources.
I use monit so I don't have to write rc scripts for node and it should take care of process lifecycle management for me. Alternatives exists such as supervisord or circus.
Save $25 for your Cloud Computing Solution with Digital Ocean.
1.) Use this link to Sign Up and save your first $10.
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
| from pyelasticsearch import ElasticSearch, ElasticHttpNotFoundError | |
| from pyparsing import * | |
| import unittest | |
| ELASTICSEARCH_INDEX = 'myindex' | |
| ELASTICSEARCH_URL = 'http://localhost:9200/' | |
| es = ElasticSearch(ELASTICSEARCH_URL) |
NewerOlder