Skip to content

Instantly share code, notes, and snippets.

Avatar

Gleb Mazovetskiy glebm

View GitHub Profile
View fetch_gists.rb
#!/usr/bin/env ruby
# coding: utf-8
require 'net/http'
require 'json'
# a simple wrapper to do an HTTPS GET
def fetch_uri(url)
STDERR.puts "GET #{url}" if ENV['VERBOSE']
uri = URI(url)
@glebm
glebm / bluepill
Created Aug 3, 2012 — forked from migrs/bluepill
bluepill init script
View bluepill
#!/bin/sh
### BEGIN INIT INFO
# Provides: bluepill
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: bluepill daemon, providing process monitoring
# Description: bluepill is a monitoring tool. More info at http://github.com/arya/bluepill.
@glebm
glebm / rideshare.md
Created Jul 13, 2012 — forked from mraaroncruz/rideshare.md
Renfe AVE rideshare app
View rideshare.md

Renfe AVE (high speed train) rideshare app

  • There are huge discounts on purchasing 4 seats

From @glebm

I'm thinking that we could take the money upfront when you join a departure (datetime, from station, to station) The hold gets charged to a group of 4 when the group 4 if full, and the user receives a confirmation email (i18n en, es, etc. would be great) If the group is not full at N hours before departure, the money is returned, and the user is notified

We would need to get data from renfe (no api) for schedule and ticket availability