This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a.next').on("click", function(){ | |
var h3 = $("h3.active").text(); | |
switch (h3) { | |
case "1. Select Your Organization": | |
$('div.your_org').children('h3').removeClass('active'); | |
$('div.your_info').children('h3').addClass('active'); | |
$('.your_info').slideDown('slow'); | |
$('.your_org').slideUp('slow'); | |
$('a.back').show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DowncaseEmailAddresses < ActiveRecord::Migration | |
def up | |
# Downcase all User emails | |
User.update_all('email = LOWER(email)') | |
# Downcase all ContactRequest emails | |
ContactRequest.update_all('email_address = LOWER(email_address)') | |
# Downcase all Reservation emails | |
Reservation.update_all('renter_email = LOWER(renter_email)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var options = { show: false }; | |
var $modal = $('#tag-modal'); | |
// Initialize the modal | |
$modal.modal(options); | |
$modal.on('hidden', function() { | |
resetTagModal(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="miloshadzic" | |
# Example aliases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.get('/organizations/' + org_id + '/free_quantities', function(data) { | |
$('.span2').on('change', function(){ | |
var input_value = $('input.span2').val(); | |
var total_quant_in_stock_diff = data.total_in_stock - input_value; | |
var total_available_free_for_user = data.free_available - input_value; | |
$('.show_quantity_left').append('<p class="quantity_left">('+ (total_quant_in_stock_diff) +' in stock)</p>'); | |
if ((total_available_free_for_user + 1) > 0){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeCommas(str) { | |
return(str.replace(/,/g,'')); | |
} | |
filterInt = function (value) { | |
if(/^\-?([0-9]+|Infinity)$/.test(value)) | |
return Number(value); | |
return NaN; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:javascript | |
$('<th>'+ 'Total' +'</th>').insertAfter('th:last'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>net.timemachine-backup</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/iacutone/scripts/timemachine-backup</string> | |
</array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (..) | |
import Html.Events exposing (onClick) | |
main: Program Never Model Msg | |
main = | |
Html.program | |
{ init = init | |
, view = view | |
, update = update | |
, subscriptions = subscriptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pry' | |
class Test | |
attr_reader :list | |
def initialize | |
@list = [] | |
end | |
def mult(n, m) |
OlderNewer