Skip to content

Instantly share code, notes, and snippets.

View shafi-codez's full-sized avatar

shafi shafi-codez

View GitHub Profile
@shafi-codez
shafi-codez / gist:e625aa5ec8e2f4554aca2967ed3079ff
Last active August 24, 2017 05:51 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {

Selenium with Python

Author

Baiju Muthukadan

Email

baiju.m.mail AT gmail.com

Version

0.5.0

Note

#!/usr/bin/env python2.7
import time
_URL = 'http://localhost/tmp/derp.html'
_NUMBER = 1000
def test_urllib2():
import urllib2