Skip to content

Instantly share code, notes, and snippets.

@endymion
endymion / gist:d5acf44be284d4feeda2
Created July 29, 2014 22:01
Merge Salesforce objects using Ruby SOAP API code
require 'soapforce'
request = <<"EOC"
<request>
<masterRecord>
<ns7:type xmlns:ns7="urn:sobject.partner.soap.sforce.com">Lead</ns7:type>
<ns8:Id xmlns:ns8="urn:sobject.partner.soap.sforce.com">00Qo0000002gZlTEAU</ns8:Id>
</masterRecord>
<recordToMergeIds>00Qo0000002gZldEAE</recordToMergeIds>
</request>
@endymion
endymion / gist:17a8c16453e21334abcf
Created August 7, 2014 18:04
Building a static site with gollum-lib, for deployment to Amazon S3.
require 'fileutils'
require 'yaml'
require 'haml'
require 'sass'
require 'gollum-lib'
desc 'Build a static web site from the Gollum wiki.'
task :build do |t, args|
puts "Generating static web site from the wiki, in _site..."
mkdir_p('_site')
def create
@user = ::User.authenticate(params[:session][:email],
params[:session][:password])
if @user.nil?
flash.now[:notice] = "Bad email or password."
render :template => 'sessions/new', :status => :unauthorized
else
if @user.email_confirmed?
remember(@user) if remember?
sign_user_in(@user)
def create
@user = ::User.authenticate(params[:session][:email],
params[:session][:password])
if @user.nil?
flash.now[:notice] = "Bad email or password."
render :template => 'sessions/new', :status => :unauthorized
else
if @user.email_confirmed?
remember(@user) if remember?
sign_user_in(@user)
def deny_access(flash_message = nil, opts = {})
store_location
flash[:failure] = flash_message if flash_message
redirect_to new_session_url
end
Feature: Catalog Version
In order to better support our customers
In order to ease migration difficulties
As a support administrator for PingFederate
I want to catalog the configuration archives of different versions
Scenario: Import version
Given I am on the version management page
        And I follow New Version
And I have a valid data archive featuring <Path> and <Contents>
<td class="price-column numeric">
<span class="in_place_editor_field" id="tickets__tickets-update_column-345-price-cell" tag="span">25.0</span><script type="text/javascript">
//<![CDATA[
new Ajax.InPlaceEditor('tickets__tickets-update_column-345-price-cell', '/tickets/tickets/update_column/345?column=price', {ajaxOptions:{method: 'post'}, cancelText:'Cancel', clickToEditText:'Click to edit', evalScripts:true, htmlResponse:false, loadingText:'Loading&hellip;', okText:'Update', savingText:'Saving&hellip;'})
//]]>
</script>
</td><td class="price-column numeric">
<span class="in_place_editor_field" id="tickets__tickets-update_column-346-price-cell" tag="span">35.0</span><script type="text/javascript">
//<![CDATA[
new Ajax.InPlaceEditor('tickets__tickets-update_column-346-price-cell', '/tickets/tickets/update_column/346?column=price', {ajaxOptions:{method: 'post'}, cancelText:'Cancel', clickToEditText:'Click to edit', evalScripts:true, htmlResponse:false, loadingText:'Loading&hellip;', okText:'Update
@endymion
endymion / gist:1072322
Created July 8, 2011 17:26
Kung Fu Staff Movie Recommendations from Chad
  • The Forbidden Kingdom
  • Hero
  • Brotherhood of the Wolf
  • Kung Fu Hustle
  • Matrix 2
@endymion
endymion / gist:2286052
Created April 2, 2012 18:24
Media queries for tablet/phone landscape/portrait
HTML:
<meta name='viewport' content='width=device-width'>
CSS:
/* phone portrait */
@media only screen and (max-width: 320px) and (orientation: portrait) {
}
@endymion
endymion / gist:2286043
Created April 2, 2012 18:23
Media queries for tablet/phone landscape/portrait
HTML:
<meta name='viewport' content='width=device-width'>
CSS:
/* iPhone portrait */
@media only screen and (max-width: 320px) and (orientation: portrait) {
}