Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function () {
$('form').on('submit', function(event){
event.preventDefault();
$.post('/rolls', function(response){
console.log(response);
if ($('img')) {
$('img').remove();
}
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
@wctej89
wctej89 / index.html
Created June 11, 2013 06:15 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
@wctej89
wctej89 / index.html
Last active December 18, 2015 11:59 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
class CreditCard
def initialize(number)
@credit_card = number.to_s
unless @credit_card.length == 16
raise ArgumentError.new("Monopoly money not accepted. Try again.")
end
end
def check_card
array = @credit_card.split(//)
@wctej89
wctej89 / test
Created October 22, 2013 22:29 — forked from foresthibbard/test
/**
* This class contains unit tests for validating the behavior of Apex classes
* and triggers.
*
* Unit tests are class methods that verify whether a particular piece
* of code is working properly. Unit test methods take no arguments,
* commit no data to the database, and are flagged with the testMethod
* keyword in the method definition.
*
* All test methods in an organization are executed whenever Apex code is deployed
global class BatchCleanContacts implements
Database.Batchable<sObject> {
global final String query;
global Integer counter = 0;
global BatchCleanContacts(String q) {
query = q;
}
<apex:page standardController="Puppy__c" extensions="PuppyListController" sidebar="false">
<h><strong><center>New Puppy</center></strong></h>
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
Name <apex:inputField label="" required="true" value="{! puppyRecord.name }"/>
</apex:pageBlockSection>
var anywhereInterval;
anywhereInterval = setInterval(function() {
var anywhere;
if ((anywhere = window.AutopilotAnywhere) && window.AutopilotAnywhere.associate)) {
clearInterval(anywhereInterval);
anywhere.associate('example@example.com', function(err) {
if (err) {
console.log("Error:", err);
console.log('test')