Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Blues kbluescode

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am kbluescode on github.
  • I am kbluescode (https://keybase.io/kbluescode) on keybase.
  • I have a public key ASAHxqlgpVoLO6pw3FM4ogxS3qNCNidu6o997ifW5k-LAgo

To claim this, I am signing this object:

@kbluescode
kbluescode / PT Web Oct 2016 - Bootstrap Page
Last active Nov 30, 2016
The bootstrap page we were making in the last tutorial
View PT Web Oct 2016 - Bootstrap Page
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<title>Bootstrap demo!</title>
</head>
<body>
<div class="fluid-container">
<div class="jumbotron">
@kbluescode
kbluescode / app.js
Created Nov 22, 2016
PT Web - Oct 24 - Week 5 Day 1 Tutorial JavaScript
View app.js
$(document).ready(function() { // run this when the page is done loading
var form = $("form") // capture the form
form.on("submit", function(event) { // when we submit the form...
var usernameLabel = $("#username-label") //get the username label and inputs themselves
usernameLabel.text("Username") // set the username label to its default value
var usernameInput = $("#username")
var passwordLabel = $("#password-label") //get the password label and inputs themselves
@kbluescode
kbluescode / validation.js
Created Apr 23, 2016
PT-Web-Fundamentals-March - JavaScript Validations
View validation.js
// this is some jquery to say when the document is ready, run whatever is
// inside this function
$(function() {
// function to check whether the form is valid or not
function isValid() {
// removes the has-error class from anything that has it
// basically, this removes all the error states from our form
$('.has-error').removeClass('has-error')
@kbluescode
kbluescode / yellow_pager.rb
Created Apr 12, 2016
PT-Web March Yellow Pager
View yellow_pager.rb
# Write a method that accepts a 10-character string of letters and
# outputs a corresponding phone number string.
# If the input letter string isn't 10 characters, you should return false. Not valid.
# 2 -> A B C
# 3 -> D E F
# 4 -> G H I
# 5 -> J K L
# 6 -> M N O
# 7 -> P Q R S
@kbluescode
kbluescode / fizzbuzz.rb
Created Apr 8, 2016
PT Web March - FizzBuzz
View fizzbuzz.rb
# First I like to write out the problem and try to start breaking it into pieces
# ==============================================================================
# grab a list of numbers
# for each one, check if divisible by 3, 5, or both
# if divisible by 3, print 'Fizz'
# if divisible by 5, print 'Buzz'
# if both, print 'FizzBuzz'
# to test running this, uncomment the blocks of code you want to run ----------
@kbluescode
kbluescode / index.html
Created Apr 2, 2016
PT-Web March Day 2
View index.html
<!doctype html>
<html>
<head>
<title>Hello, World!</title>
</head>
<body>
<h1>This is the most important header on the page</h1>
<h2>This is the 2nd most important head on the page</h2>
<div>
<p>Any text here is a <strong>paragraph.</strong>
@kbluescode
kbluescode / index.html
Created Mar 30, 2016
PT Web March - Day One
View index.html
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="main.css" />
<title>Hello, World!</title>
</head>
<body>
<h1>Hello!</h1>
<img src="http://www.toledoblade.com/image/2005/10/21/800x_b1_cCM_z/Movie-review-Everything-is-Illuminated.jpg" />
<table id="name-color-table">
View validation.js
$(function() { //run when the page loads
$('#submit').on('click', function() { //when you click submit
$('.has-error').removeClass('has-error') //remove last batch of errors
var valid = true //starts off totally valid
var username = $('#username') //grab the username input
var usernameLabel = $("#username-label") //grab the username label
var usernameText = username.val() //grab the username input's text
View animal.rb
class Animal
# the double @ sign indicates this variable belongs to the class
@@count = 0
def initialize(name)
# the single @ sign indicates this variable belongs to the individual object
@name = name
@@count += 1
end