Skip to content

Instantly share code, notes, and snippets.

View kaileeagray's full-sized avatar

Kailee Gray kaileeagray

View GitHub Profile
@kaileeagray
kaileeagray / depends_on.js
Created September 10, 2016 17:50 — forked from masonjm/depends_on.js
Show/Hide form fields based on the value in another field.
(function( $ ){
$.fn.dependsOn = function(element, value) {
var elements = this;
var hideOrShow = function() {
var $this = $(this);
var showEm;
if ( $this.is('input[type="checkbox"]') ) {
showEm = $this.is(':checked');
} else if ($this.is('select')) {
@kaileeagray
kaileeagray / app.rb
Created July 12, 2016 00:44 — forked from runemadsen/app.rb
Sinatra File Upload
require 'sinatra'
get "/" do
erb :form
end
post '/save_image' do
@filename = params[:file][:filename]
file = params[:file][:tempfile]
@kaileeagray
kaileeagray / .gitignore
Created March 24, 2016 04:57 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #