This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra/base' | |
class MyApp < Sinatra::Base | |
get '/' do | |
'myapp2 Hello world!' | |
end | |
get '/hello' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "win32/service" | |
require "pp" | |
include Win32 | |
options = {:service_name=>'ruby_example_service', | |
:service_type => Service::WIN32_OWN_PROCESS, | |
:description => 'A custom service I wrote just for fun', | |
:start_type => Service::AUTO_START, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()"> | |
<mx:HTML left="10" top="10" bottom="10" right="10" id="html"/> | |
<mx:Script> | |
<![CDATA[ | |
private function init():void { | |
html.addEventListener(Event.COMPLETE, this.htmlComplete); | |
html.htmlText = Helper.html(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Brian Pfeil"> | |
<!-- Date: 2010-05-20 --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Brian Pfeil"> | |
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/ui-lightness/jquery-ui.css" type="text/css" media="screen" title="no title" charset="utf-8"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var c = new forcetk.Client('<client_id>'); | |
c.login({ | |
'environment': 'test', | |
'client_id': '<client_id>', | |
'client_secret': '<client_secret>', | |
'username': '[email protected]', | |
'password': 'secret123' | |
}, function(data) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: depends on jQuery and hex_md5 function @ http://pajhome.org.uk/crypt/md5/ | |
function reloadPageIfScriptChanges(patterns, pollInterval) { | |
patterns = $.isArray(patterns) ? patterns : [patterns]; | |
$.ajaxSetup({ cache: false }); | |
var digests = {}; | |
setInterval(function() { | |
$('script[src]').each(function() { | |
var src = $(this).attr('src'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadInlineTemplates(templateSelector) { | |
var templatesString = $.trim($(templateSelector).html()); | |
var templateName = null; | |
var templates = {}; | |
$.each(templatesString.split("\n"), function(i, line) { | |
var matches = line.match(/(.*)\.mustache\:/i); | |
console.log(matches); | |
if (matches !== null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class PDFDownloader { | |
// called from trigger | |
@future (callout=true) | |
public static void download(String sessionID, String attId) { | |
String vfEndpoint = 'https://c.cs10.visual.force.com/apex/PDFTest_mrk?id=' + EncodingUtil.urlEncode(attId, 'UTF-8'); | |
String vfSessionURL = 'https://cs10.salesforce.com/visualforce/session?url=' + EncodingUtil.urlEncode(vfEndpoint, 'UTF-8'); | |
Http http = new Http(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Veeva API helper library | |
// dependencies: async | |
// Brian Pfeil - 2012-03-01 - init | |
(function() { | |
window.veeva = { | |
getRandomFunctionName: function() { | |
var randomNumber = Math.floor(Math.random() * (new Date()).getTime()); | |
var millisecondsSinceEpoch = (new Date().getTime()); |
OlderNewer