Skip to content

Instantly share code, notes, and snippets.

Aaron Eisenberger aaronchi

  • Santa Monica, CA
Block or report user

Report or block aaronchi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:62ca0f91a7678b692359f9729fca8dbe
# Extends Array class with a new flatten method
# Type checking is not done since this is extending Array
# Uses simple recursion
class Array
def re_flatten
flat = []
self.each do |a|
if a.is_a?(Array)
View gist:ae35030524810b40da3a
---
name: Google Calendar
group: google-apps
base_url: https://www.google.com/calendar
allowed_hosts:
- google.com
- accounts.google.com
requires_plugin: true
validation_method: script
login_type: email
View gist:ce0c43b402eee4fa4055
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="_ca41734ef91362577eb1" Version="2.0" IssueInstant="2014-11-03T22:44:43Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" AssertionConsumerServiceURL="http://bitium-sugarcrm.keewooi.com/index.php?module=Users&action=Authenticate">
<saml:Issuer
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">php-saml
</saml:Issuer>
<samlp:NameIDPolicy
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" AllowCreate="true">
</samlp:NameIDPolicy>
<samlp:RequestedAuthnContext
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Comparison="exact">
View gist:4a1a2db3a994c8a95168
---
name: Webex Enterprise
base_url: https://{subdomain}.webex.com/
login_type: username
installation:
fields:
- name: subdomain
notes: within_frame not working reliably with webkit and frameset
spider:
driver: poltergeist
View gist:c914e60527c0f8a0b893
---
name: Webex
base_url: https://meetings.webex.com
login_type: email
authentication_types:
- browser
launch_timeout: 60
spider:
driver: webkit
actions:
View omniauth_smartsheet
require 'omniauth-oauth2'
module OmniAuth
module Strategies
class Smartsheet < OmniAuth::Strategies::OAuth2
# Give your strategy a name.
option :name, "smartsheet"
# This is where you pass the options you would pass when
# initializing your consumer from the OAuth gem.
View gist:4c56a26e604c39d3da1d
<?xml version="1.0" encoding="UTF-8"?>
<xmlrequest>
<request>
<control>
<senderid>Bitium</senderid>
<password>5V4da3RkhB</password>
<controlid>bitium</controlid>
<uniqueid>false</uniqueid>
<dtdversion>2.1</dtdversion>
</control>
@aaronchi
aaronchi / gist:6ce34f208e2fe25209b4
Created Jul 11, 2014
Intaact XML schema -> YAML
View gist:6ce34f208e2fe25209b4
schemas:
users:
attributes:
- name: request
attributes:
- name: control
attributes:
- name: senderid
value: $account_login
- name: password
@aaronchi
aaronchi / waitFor.js
Created Jun 9, 2014
waitFor without deffered
View waitFor.js
(function ($) {
'use strict';
$.fn.waitFor = function (options) {
options = options || {}; // Note: all arguments default
options.timeout = options.timeout || 100; // Note: default timeout
var el;
var selector = this.selector;
function waitForElement(timeout) {
var $elements = $(selector);
@aaronchi
aaronchi / gist:9359599
Created Mar 5, 2014
Box SAML debugging
View gist:9359599
<samlp:AuthnRequest IssueInstant="2014-03-05T01:39:52.993Z"
ID="v2s9D7jwhXxeuo5pxOt4lBGZ54x"
Version="2.0"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
>
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">box.net</saml:Issuer>
<samlp:NameIDPolicy AllowCreate="true" />
</samlp:AuthnRequest>
<samlp:Response ID="_0c0df300-8635-0131-7cd0-20c9d044e103"
You can’t perform that action at this time.