Skip to content

Instantly share code, notes, and snippets.

LilC:Sites corey$ cd demos.dev/
LilC:demos.dev corey$ git status
# On branch master
nothing to commit (working directory clean)
LilC:demos.dev corey$ git checkout develop
Branch develop set up to track remote branch develop from origin.
Switched to a new branch 'develop'
LilC:demos.dev corey$ git pull
Already up-to-date.
LilC:demos.dev corey$ git flow init
def valid_triangle?(a, b, c)
s = (a + b + c) / 2.0
not_triangle = (s - a) * (s - b) * (s - c)
if not_triangle <= 0
return false
end
arr_s = [a,b,c].sort

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.
@Cspeisman
Cspeisman / zoo.js
Created September 5, 2013 14:52 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------
@Cspeisman
Cspeisman / form-validator.js
Last active December 22, 2015 09:48 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
$("form[name='sign_up']").submit(validatePassword);
});
function validateEmail(){
var email = $("[name='email']").val()
var email_validate = /\w+\@.+\.\w{2,}/
if (email_validate.test(email) == false ){
@Cspeisman
Cspeisman / carousel.js
Last active December 22, 2015 09:58 — forked from ksolo/carousel.js
Image Carousel

###List of technologies to work with more

  • jekyll
  • node.js/socket.io/express.js
  • more python
  • more familirity with sass mixins
@Cspeisman
Cspeisman / file_watch
Created February 25, 2014 02:38
Script to watch files for changes
# to run script use command 'ruby file_watch.rb path/to/directory'
filetypes = ['css', 'html', 'php', 'rb', 'erb', 'scss', 'js']
watch_folder = ARGV[0]
puts "Watching #{watch_folder} and subfolders for changes in project files..."
while true do
// declares global variables
var newEntry = document.getElementById('newEntry'),total = 0,
printedTotal = document.getElementById('total'),
entryBody = document.getElementById('entries');
// listen for event on the 'entry' form
// calls function executeCashRegister
document.getElementById('entry').addEventListener('submit', executeCashRegister)
def make_change(num, change = {pennies: 0, nickels: 0, dimes: 0, quarters: 0})
return change if num == 0
if num < 5
num.times do |penny|
change[:pennies] += 1
num -= 1
end
make_change(num, change)