This file contains 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 ubuntu:trusty | |
RUN apt-get update && apt-get install -y ruby ruby-dev gcc make curl | |
RUN gem install sinatra --no-rdoc --no-ri | |
ADD . /srv/ | |
# start it up | |
WORKDIR /srv/ |
This file contains 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 ruby | |
require "open3" # for reading stderr | |
# A dirt-simple script to merge a pull request from someone on github. | |
# Andre Lewis, 2009 | |
# | |
# Assumptions: | |
# 1. you're currently working on master | |
# 2. you've already reviewed the pull request and have decided to include it. |
This file contains 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
# Quick and dirty applescript to determine batter life under very light load. This script just navigates Safari to a | |
# page every 10 seconds to simulate web browsing. | |
# | |
# You'll need to change the file output path (in the log method) for your machine. | |
# | |
# The test: | |
# * a freshly charged and calibrated battery | |
# * dim brightness to 50% | |
# * turn off bluetooth | |
# * set display to never go to sleep |
This file contains 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
>> MySQLTuner 1.0.1 - Major Hayden | |
-------- General Statistics -------------------------------------------------- | |
[--] Skipped version check for MySQLTuner script | |
[OK] Currently running supported MySQL version 5.1.41-3ubuntu12.3 | |
[OK] Operating on 32-bit architecture with less than 2GB RAM | |
-------- Storage Engine Statistics ------------------------------------------- | |
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster | |
[--] Data in InnoDB tables: 267M (Tables: 9) |
This file contains 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
require "rubygems" | |
require "nokogiri" | |
puts "starting" | |
html=<<-EOS | |
<div class="result"> | |
<div> | |
<h1> |
This file contains 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
# Takes an IP or hostname. Reports 1 if it can ping the host, 0 if it can't | |
class Ping < Scout::Plugin | |
OPTIONS=<<-EOS | |
host: | |
name: Host | |
notes: the IP address or hostname to ping | |
EOS | |
def build_report |
This file contains 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
#!/bin/sh | |
# | |
# killspike2 | |
# Remove (presumably erroneous) peaks from RRD files | |
# | |
# Matt Zimmerman <mdz@debian.org>, 05/2002 | |
# | |
set -e |
This file contains 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
# Multiple, concurrent HTTP (non-SSL) requests | |
# | |
# Works in macuruby | |
require 'net/http'; | |
def do_https | |
http=Net::HTTP.new('www.yahoo.com', 80) | |
http.start() {|http| | |
req = Net::HTTP::Get.new('/') |
This file contains 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
warning: Could not find object file "/Users/lrz/src/macruby-0.10/ext/openssl/openssl_missing.o" - no debug information available for "openssl_missing.c". | |
warning: Could not find object file "/Users/lrz/src/macruby-0.10/ext/openssl/ossl.o" - no debug information available for "ossl.c". | |
warning: Could not find object file "/Users/lrz/src/macruby-0.10/ext/openssl/ossl_asn1.o" - no debug information available for "ossl_asn1.c". | |
warning: Could not find object file "/Users/lrz/src/macruby-0.10/ext/openssl/ossl_bio.o" - no debug information available for "ossl_bio.c". | |
warning: Could not find object file "/Users/lrz/src/macruby-0.10/ext/openssl/ossl_bn.o" - no debug information available for "ossl_bn.c". |
This file contains 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
Apache Server Status for localhost | |
Server Version: Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.2 with | |
Suhosin-Patch Phusion_Passenger/2.2.15 | |
Server Built: Apr 13 2010 19:28:27 | |
__________________________________________________________________ | |
Current Time: Friday, 20-May-2011 11:46:05 PDT | |
Restart Time: Friday, 25-Mar-2011 17:38:18 PDT |
OlderNewer