This file contains 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
public class V1Api { | |
private V1BasicConnector; | |
public V1Api(){ | |
V1BasicConnector = new V1BasicConnector('https://www99.host.com/myInstance', 'admin', 'admin'); | |
} | |
public void CreateStory(V1Story story) | |
{ | |
Dom.Document doc = new Dom.Document(); |
This file contains 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
public class FullMultiMock implements HttpCalloutMock { | |
private integer urlCount { get; set; } | |
private List<MockCallout> mockCallouts {get; set;} | |
public FullMultiMock(List<MockCallout> callouts){ | |
system.debug('callouts : ' + callouts); | |
mockCallouts = callouts; | |
urlCount = 0; | |
} |
This file contains 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
Leap.plugin('book', function(options) { | |
options || (options = {}); | |
options.frameDuration || (options.frameDuration = 20); | |
var toDegrees = 180/Math.PI; | |
var sendEvent = _.debounce(function(eventName, controller){ | |
console.log(eventName); | |
$.jGrowl(eventName); | |
controller.emit(eventName); |
This file contains 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
$username = "admin" | |
$password = "admin" | |
$instance = "http://localhost/VersionOne.Web/" | |
$base64ed = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($($username + ":" + $password))) | |
$storyId = "S-01001" | |
$story = GetStoryByID $storyId | |
UpdateAsset $story "<Asset><Attribute name='Description' act='set'>Descript Insert!</Attribute></Asset>" | |
#disabled because this will update a pile of stories -- be careful! |
This file contains 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"?> | |
<!DOCTYPE stylesheet | |
[ | |
<!ENTITY mdash "—"> | |
]> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:template match="/"> | |
<html> | |
<head> |
This file contains 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
namespace Moq.Context { | |
public static class DbContextMockExtension | |
{ | |
public static Mock<AHContext> SetupPartOfTheContextWith<T>(this Mock<AHContext> mockContext, List<T> listOfT, Expression<Func<AHContext, DbSet<T>>> setupReturn) where T : BaseEntity | |
{ | |
var queryable = listOfT.AsQueryable(); | |
var mockSet = new Mock<DbSet<T>>(); |
This file contains 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
@echo do you have winutils or hadoop_home? | |
mkdir C:\tmp\hive | |
%HADOOP_HOME%\bin\winutils chmod 777 /tmp/hive | |
@echo does your path have a thing for spark? | |
cd C:\ | |
spark-shell |
This file contains 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 buildIt($){ | |
this.postIt = function(itemToChange){ | |
$.post('giggle', function(data){ | |
itemToChange.item = data.item; | |
}); | |
} | |
}; | |
This file contains 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
public class Checksum | |
{ | |
private Dictionary<string, char> _lookup = new Dictionary<string, char>(); | |
private char[] _checksumChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345".ToCharArray(); | |
public Checksum() | |
{ | |
for (var i = 0; i < 32; i++) | |
{ | |
var bit = Convert.ToString(i, 2).PadLeft(5, '0'); |
This file contains 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
export class SalesforceChecksum | |
{ | |
private lookup = {}; | |
private checksumChars = Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345"); | |
constructor() | |
{ | |
for (var i = 0; i < 32; i++) | |
{ | |
let value = (i >>> 0).toString(2); |
OlderNewer