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
$('form').submit(function(event){ | |
event.preventDefault(); | |
event.stopPropogation(); // same thing | |
$(this); // <-- the form that was submitted | |
$('input', this); // <-- all the inputs for this form that need validation | |
$('input', this).each(function(){ | |
var element = $(this); // <-- this is the current field which can be validated | |
if(element.attr('required') == 'required' && element.val().trim() != '' && element.val() ){ |
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
'use strict' | |
console.log "I'm the client code" | |
# A global reference, because coffeescript wraps everything in a closure | |
root = global ? window | |
root.Meteor.subscribe 'messages' | |
root.Meteor.subscribe 'rooms' | |
# root.Meteor.startup -> |
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
/** | |
* This code was written by the FED team to handle fast taps between products on the browse results page. This was necessary because | |
* there is no native tap event, and jquery was doing some form of magic to handle taps with a timeout. Also, native click/mousedown handlers | |
* do not work because there is a 300ms delay in the mobile browser in order for them to detect if it is a click or double click or gesture | |
* but since we have doubleclick and singleclick code here and want a fast response, we use the touchstart and touchend events to detect if an item was clicked. | |
* We also measure the distance from the start of the tap to the end of the tap along with if the item was tapped on at any point to be able to see | |
* if this is a swipe gesture or a tap gesture so scrolling and swiping are unimpeded. There is a 10px tolerance added for movement of the finger during taps. | |
*/ | |
var SearchResultController = { |
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
define([ | |
'jquery', | |
'app/controllers/modals/view-transaction-details', | |
'app/controllers/modals/summary-member-savings', | |
'app/controllers/modals/summary-member-points', | |
'app/controllers/modals/promotional-new' | |
], function( | |
$, | |
TransactionDetails, | |
SummaryMemberSavings, |
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
#!/usr/bin/env node | |
var program = require('commander'), | |
spawn = require('child_process').spawn, | |
print = require('util').print, | |
fs = require('fs'), | |
path = require('path'), | |
exists = fs.existsSync || path.existsSync, | |
cwd = process.cwd(), | |
which = require('which'), |
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
var stream = require('stream'), | |
util = require('util'); | |
function FilterThirdPartyWarnings(options){ | |
// allow use without new | |
if (!(this instanceof FilterThirdPartyWarnings)) { | |
return new FilterThirdPartyWarnings(options); | |
} | |
stream.Transform.call(this, options); |
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 amounts = document.querySelectorAll('#Posted tbody .amount'); | |
var balance = Number(document.querySelector('#AccountDetailTable .card-accountdetailcol tbody tr td:nth-child(2)').innerText.substr(1).replace(',','')); | |
var iii=0; | |
var amount = ''; | |
var element = null; | |
var elementsArray = []; | |
for(iii=0; iii < amounts.length; iii++) { | |
element = amounts[iii]; |
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
# oh-my-zsh Zen Theme | |
### Git | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}%{$reset_color%}%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_no_bold[white]%}☁%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[magenta]%}▴%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[magenta]%}▾%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_no_bold[green]%}✚%{$reset_color%}" |
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="robbyrussell" | |
#ZSH_THEME="cloud" | |
#ZSH_THEME="wedisagree" # throws an error |
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
var runningProcessCount = 0, | |
processQueuePosition = 1, | |
processLimit = 2, | |
totalProcesses = 10; | |
function throttleProcesses(){ | |
if(processLimit > runningProcessCount){ | |
fakeProcess(); | |
return true; | |
} else { |
OlderNewer