Skip to content

Instantly share code, notes, and snippets.

View siciliana's full-sized avatar
🌴
Retired former developer

Jen Fry siciliana

🌴
Retired former developer
  • Immunefi
  • Luz, Portugal
View GitHub Profile
def super_fizzbuzz(array)
new_arr = []
(array).each do |i|
if (i % 3).zero? && (i % 15) != 0
puts new_arr <<'Fizz'
elsif (i % 5).zero? && (i % 15) != 0
puts new_arr << 'Buzz'
elsif (i % 15).zero?
puts new_arr <<'FizzBuzz'
else
# Solution for Challenge: Pig-latin. Started 2013-08-28T23:49:41+00:00
def pig_latin
puts "Enter a word."
word = gets.chomp
vowels = ["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"]
first_letter = word.chr

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.

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.
@siciliana
siciliana / zoo.js
Created September 26, 2013 14:39 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
var Zoo(animals) {
var animals
}
@siciliana
siciliana / index.html
Last active December 24, 2015 00: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>
@siciliana
siciliana / carousel.js
Last active December 24, 2015 00:39 — forked from ksolo/carousel.js
Image Carousel
@siciliana
siciliana / form-validator.js
Last active December 24, 2015 00:59 — forked from ksolo/form-validator.js
Form Validation
$(document).ready(function(){
$('form').on('submit', function(event){
event.preventDefault()
$('#errors').html('')
var email_address = $(this).find("input[name='email']").val()
var password = $(this).find ("input[name='password']").val()
var email_regex = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDC
@siciliana
siciliana / form-validator.js
Created September 26, 2013 22:19 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
//Your code...
});
@siciliana
siciliana / zoo.js
Last active December 24, 2015 06:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
function Animal(name, legs) {
this.name = name;
this.legs = legs;
this.identify = function () {
return "I am a " + this.name + " with " + this.legs + " legs.";
};