Skip to content

Instantly share code, notes, and snippets.

Avatar

Carolyn P portercar

View GitHub Profile
View gist:280b1df4028c62289a908d582b7059ac
<style>
.content-wrapper{
width: 100%;
}
.content-wrapper img{
width: 100%;
}
.text-wrapper{
View BatchRequest.gs
function main() {
Logger.clear();
var apiKey = '';
var acctID = '';
var token = retrieveTokenByApiKey(apiKey);
url = 'https://api.wildapricot.org/v2/accounts/acctID/'
var batchUrl = "https://api.wildapricot.org/batch";
@portercar
portercar / rpn.rb
Last active Dec 19, 2015
RPN Calculator (Recursive)
View rpn.rb
class RPNCalc
def evaluate(str)
operator = /[\/\+\-\*\^]/
stack = []
equation = str.split(' ')
while equation[0].numeric?
equation[0] = Float(equation[0])
stack << equation.shift
end
@portercar
portercar / flatten.rb
Created Jun 29, 2013
Flatten Array Recursively
View flatten.rb
def flatten(array)
if array.empty?
array
else
element = array.pop
element.kind_of?(Array) ? flatten(array) + flatten(element) : flatten(array) << element
end
end