I hereby claim:
- I am trevrosen on github.
- I am trevrosen (https://keybase.io/trevrosen) on keybase.
- I have a public key whose fingerprint is 17F7 7DE6 AF9C A777 FA53 8281 5605 4B6F F40D E0F9
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# From Dave Thomas' Elixir book: | |
# https://pragprog.com/book/elixir/programming-elixir | |
fizzbuzz = fn | |
0,0,_ -> "FizzBuzz" | |
0,_,_ -> "Fizz" | |
_,0,_ -> "Buzz" | |
_,_,n -> n | |
end |
#! /usr/bin/env ruby | |
require "rubygems" | |
require "hpricot" | |
# File to alter and suffix to add | |
HEADER_FILE = "/path/to/your/file" | |
suffix = "?time=" + Time.now.strftime('%Y%m%d%H%M%S') | |
# Use Hpricot to open and parse file as well as to find path |
# --------------------- POST handler -- processes the form submission ----------------------- | |
post "/post" do | |
# Instantiate the Submission to get the party started | |
sub = Submission.new(params, | |
request.env['HTTP_REFERER'], | |
request.env['REMOTE_ADDR'] | |
) | |
debugger |
$: << File.join(File.dirname(__FILE__), '..') | |
begin | |
require "spec" | |
require "spec/interop/test" | |
require 'rack/test' | |
require "proxy" | |
require "libxml" | |
Test::Unit::TestCase.send :include, Rack::Test | |
rescue LoadError => error |
# Booting ---- | |
$: << File.join(File.dirname(__FILE__), 'lib') | |
$: << File.join(File.dirname(__FILE__), 'routes') | |
$: << File.join(File.dirname(__FILE__), 'helpers') | |
SINATRA_ROOT = File.expand_path(File.dirname((__FILE__))) unless defined? SINATRA_ROOT | |
require "rubygems" | |
require "sinatra" | |
require 'config/config' | |
# /Booting ---- |
ZPROXY_CONFIG = Hash.new | |
# General config | |
configure do | |
gems = %w(activerecord logger hpricot open-uri resolv restclient net/http yaml rexml/document rack-flash mailfactory json net/smtp) | |
zproxy_libs = %w(submission validator webex) | |
(gems + zproxy_libs).each do |dependency| | |
begin | |
require dependency |
## Provides a list of attendees based on meeting ID | |
get '/list-attendees/:meeting_id' do | |
w = WebEx::Request.new | |
attendees = w.lst_meeting_attendee(params[:meeting_id]) | |
if attendees[:response][:result] == "SUCCESS" | |
@attendees = attendees[:body] | |
erb :list_attendees, :layout => false | |
else | |
LOGGER.warn('Problem obtaining meeting information') | |
end |
module WebEx | |
## Convenience methods | |
def self.filter_by_session_name(collection, name=nil) | |
return collection unless name | |
collection.collect{|session| | |
session if session['sessionName'].downcase.include?(name) | |
}.compact | |
end | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Colors</key> | |
<dict> | |
<key>Background</key> | |
<string>0.044 0.063 0.129</string> | |
<key>InsertionPoint</key> | |
<string>1.000 1.000 1.000</string> |