Skip to content

Instantly share code, notes, and snippets.

@kelmerp
kelmerp / index.html
Last active December 21, 2015 03:19 — 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>
@kelmerp
kelmerp / zoo.js
Last active December 21, 2015 03:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
var Zoo = {
init: function() {
this.animals = animals;
},
bipeds: function() {
this.bipeds = bipeds
},
@kelmerp
kelmerp / form-validator.js
Created August 15, 2013 19:31 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
//Your code...
});
// shorthand for $(document).ready();
$(function(){
//Your code...
$("form").submit(function(event) {
event.preventDefault();
var array = $('form').serializeArray();
var emailRegex = /[A-z0-9]+@[A-z0-9]+\.[A-z]{2,4}/;
var passwordRegex = /(.*[A-Z]+.*[0-9].*|.*[0-9].*[A-Z]+.*)/;
var email = array[0].value;
var password = array[1].value;
@kelmerp
kelmerp / carousel.js
Created August 16, 2013 00:22 — forked from ksolo/carousel.js
Image Carousel

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.
/* 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.
*/
@kelmerp
kelmerp / index.html
Last active December 22, 2015 09:19 — 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>
@kelmerp
kelmerp / zoo.js
Last active December 22, 2015 09:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
var Zoo = {
init: function(animals){
this.animals = animals
},
bipeds: function(){
return this.animals.filter(function(animal){ return animal.legs === 2});
},
@kelmerp
kelmerp / gist:3e645298958263c39ac00a701c82fbac
Created April 7, 2022 16:40
rails best practices report on sittercity
Source Code: |===============================================================================================================|
/Users/kPerez/dev/ruby/empire-monorepo/sittercity/db/schema.rb:15 - always add db index (account_notes => [member_id])
/Users/kPerez/dev/ruby/empire-monorepo/sittercity/db/schema.rb:15 - always add db index (account_notes => [transaction_id])
/Users/kPerez/dev/ruby/empire-monorepo/sittercity/db/schema.rb:24 - always add db index (account_termination_reasons => [member_id])
/Users/kPerez/dev/ruby/empire-monorepo/sittercity/db/schema.rb:131 - always add db index (aloka_legacy_conversation_messages_email_templates_xref => [conversation_message_id])
/Users/kPerez/dev/ruby/empire-monorepo/sittercity/db/schema.rb:165 - always add db index (apple_receipts => [payment_method_id])
/Users/kPerez/dev/ruby/empire-monorepo/sittercity/db/schema.rb:202 - always add db index (background_check_disputes => [background_check_id])
/Users/kPerez/