Skip to content

Instantly share code, notes, and snippets.

View scott's full-sized avatar

Scott Miller scott

View GitHub Profile
@scott
scott / oauth.yml
Last active August 1, 2019 16:17
Sample AUTH_FILE .yml for Helpy Pro
omniauth:
providers:
saml:
# Name for the attribute service. Defaults to Required attributes.
attribute_service_name: "Helpy"
# The URL at which the SAML assertion should be received.
# Should be of the format yourURL/users/auth/saml/callback
assertion_consumer_service_url: "http://yourdomain/users/auth/saml/callback"
@scott
scott / buttons.js
Created July 24, 2018 15:28
Add 3 buttons to Helpy
<script>
$(document).ready(function(){
var button = function(url, icon, linked_text) {
var $icon = $('<i class="circle-icon"></i>')
.addClass(icon)
.css('color', '#666');
var $buttonLink = $("<a></a>")
.attr('href',url)
.append($icon)
@scott
scott / helpybgimage.css
Last active January 18, 2017 01:31
Add these styles to your design CSS overrides to add a background image to your Helpy
.flat-main-panel, .main-option {
background-color: transparent;
color: #fff;
}
.flat-main-panel {
background-image: url('http://your.helpy.io/uploads/your/image/file/3/notebook-1280538_1920.jpg');
background-repeat: no-repeat;
background-position: right top;
background-attachment: fixed;
background-size: 100%;
@scott
scott / widget.js
Created December 28, 2015 20:58 — forked from lukencode/widget.js
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
/*
* Tracks a video's play progress via Vertster
* http://wistia.com/
*
* Usage:
*
* Vswap.trackWistiaVideo(560, 'wistia_123', 63.0);
*
* Note: This currently only works with a Wistia video embed but could be easily adapted to
* work with YouTube or other video players.
namespace :highrise do
desc 'import contacs from csv'
task :import_contacts => :environment do
require 'csv'
puts 'Importing CSV file. This may take a while if you have a lot of contacts.'
<!-- Sales Conversion Code -->
<script language="JavaScript" type="text/JavaScript">
var code_version = "1";
var pageID = "9999"; // <=== IMPORTANT replace this with your pageID
var code_domain = "r.vertster.com";
var rotate_domain = "r.vertster.com";
@scott
scott / Vertster.com Alternate Conversion Tracking Snippet.js
Created March 25, 2009 20:43
Use this code for capturing conversion actions when you have multiple conversion pages for the same test or cannot use the standard script.
<!-- Conversion Code -->
<script language="JavaScript" type="text/JavaScript">
var code_version = "1";
var pageID = "9999"; // <=== IMPORTANT replace this with your pageID
var code_domain = "r.vertster.com";
var rotate_domain = "r.vertster.com";
class DocSweeper < ActionController::Caching::Sweeper
observe Doc
def after_save(doc)
expire_page_for(doc)
end
def after_destroy(doc)
expire_page_for(doc)