Skip to content

Instantly share code, notes, and snippets.

View santiycr's full-sized avatar
💭
Always learning

Santiago Suarez Ordoñez santiycr

💭
Always learning
View GitHub Profile
@santiycr
santiycr / selenium_sauce_tests.py
Created August 13, 2012 18:19
Run multiple browsers on Sauce in parallel using some python magic
#!/usr/bin/env python
# encoding: utf-8
from selenium import webdriver
import unittest
import nose
from nose.plugins.multiprocess import MultiProcess
import new
import json
import httplib
@santiycr
santiycr / commit-msg
Created December 18, 2012 15:07
Git commit hook to automatically add your Selenium wiki name to every commit.
#!/bin/bash
# Automatically adds your Selenium wiki name in case it's missing
# Place in selenium/.git/hooks
# chmod +x selenium/.git/hooks/commit-msg
# Append 'export SELENIUM_WIKI_NAME="YourWikiName"' to your bashrc/zshrc
echo "Checking commit message..."
if [ -z "$(grep -e "^$SELENIUM_WIKI_NAME: " $1)" ]; then
echo "Missing Wiki name in commit message, appending"
@santiycr
santiycr / gist:4489869
Last active December 10, 2015 20:38
import time declarations, nono!
In [2]: class C(object):
...: def hi(self, k, d=dict()):
...: d[k] = 1
...: print d
...:
In [3]: c = C()
In [4]: c.hi(1)
{1: 1}
@santiycr
santiycr / sauce_connect_setup.sh
Last active December 14, 2015 19:49
A small bash script to download and start Sauce Connect as part of a Travis Build.
#!/bin/bash
# Setup and start Sauce Connect for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# SAUCE_USERNAME
# SAUCE_ACCESS_KEY
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
#
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
#!/usr/bin/env python
import os
import time
import subprocess
import tempfile
import zipfile
import urllib
import logging