Skip to content

Instantly share code, notes, and snippets.

View skwashd's full-sized avatar
👨‍💻
planning, coding, reviewing

Dave Hall skwashd

👨‍💻
planning, coding, reviewing
View GitHub Profile
@skwashd
skwashd / site-up.py
Created September 18, 2011 13:52
Python script to check if a remote site is up and measure the load time. Ideal for running from cron.
#!/usr/bin/env python
#
# Check if a website is loading and contains a nominated string.
#
# Usage:
# site-up.py http://example.com/ 'text to search for'
#
@skwashd
skwashd / index.sh
Created August 13, 2011 08:35
Index all of your articles
#!/bin/bash
#
# Add all of your Drupal nodes to the search index.
#
# NOTE:
# * This should work when you have around 10 000 nodes.
# * I assume you have set search to add 500 nodes per cron run.
# * There are better ways of doing this, but it does the job.
#