Skip to content

Instantly share code, notes, and snippets.

@obi-a
obi-a / terms_of_service.markdown
Created June 19, 2021 17:01 — forked from devver/terms_of_service.markdown
A general Terms of Service under the Creative Commons License

Terms of Service

Last revised on [DATE]

The Gist

[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

@obi-a
obi-a / compass.rb
Last active September 7, 2015 20:39
maestro script
exists do
title.where("text": "obiora")
end
exists do
link.where("id": "aboutus").click
end
exists do
text_field.where("id": "name").set("john")
#document ready
jQuery ($) ->
#Set the size attribute of the zipcode field to 10
$("#zipcode").attr("size", "10")
#get size attribute for zipcode
zipcode_size = $("#zipcode").attr("size")
#Remove the size attribute from zipcode
$("#zipcode").removeAttr("size")
@obi-a
obi-a / us_weather_alerts.rb
Created May 22, 2011 02:35
monitor weather alerts in the United States #hackdisrupt
require 'open-uri'
require 'simple-rss'
def weather_alerts(county)
source = "http://alerts.weather.gov/cap/us.php?x=0"
rss = SimpleRSS.parse open(source)
count = 0
@obi-a
obi-a / travel_alert.rb
Created May 21, 2011 23:28
Check if there is a travel alert warning for this location #hackdisrupt
require 'open-uri'
require 'rss/1.0'
require 'rss/2.0'
require 'activesupport'
def has_travel_alert(location)
source = "http://travel.state.gov/_res/rss/TWs.xml"
@obi-a
obi-a / check if location had an earthquake in the last 7 days (realtime) #hackdisrupt
Created May 21, 2011 20:15
check if location had an earthquake in the last 7 days (realtime) #hackdisrupt #
require 'rubygems'
require 'csv-mapper'
require 'open-uri'
require 'activesupport'
def had_earthquake(location)
source = "http://earthquake.usgs.gov/earthquakes/catalogs/eqs7day-M1.txt"
problem_regions = []
@obi-a
obi-a / ragios_design_concept.rb
Created April 10, 2011 16:48
testing Design ideas for Ragios 0.5: Adding detached monitors
require 'rubygems'
require "bundler/setup"
dir = Pathname(__FILE__).dirname.expand_path
require dir + 'lib/ragios'
module Ragios
module Monitors
class System
@obi-a
obi-a / flydb.rb
Created March 28, 2011 08:31
Ruby recipes for couchDB - Still a work in progress
require 'rubygems'
require 'rest_client'
require 'yajl'
begin
#create a db
#response = RestClient.put 'http://127.0.0.1:5984/contacts', {:content_type => :json}
#c = response.to_str
#puts c
#!/bin/bash
#download the
@obi-a
obi-a / ragios.rb
Created October 3, 2010 20:19
St. Ruby - A Ruby based Object Oriented System and Network Monitoring Tool
#!/usr/bin/ruby
#Title :Ragios (aka St. Ruby)
#Date :10/13/2010
#Author :Obi Akubue
#Version :0.3.3
#description: This is the framework for a Ruby Based System and Network Monitoring Tool
#this project is just an excuse to play with ruby and linux servers
require 'net/http'