Skip to content

Instantly share code, notes, and snippets.

View FrankFang's full-sized avatar
🎯
Focusing

Frank Fang FrankFang

🎯
Focusing
View GitHub Profile
@FrankFang
FrankFang / range.js
Created February 19, 2014 11:08
range.js
Array.apply(null, Array(3)).map(Function.prototype.call.bind(Number))
Array.apply(null, Array(3)).map(function(value,index){return index})
{
"directory": "components"
}
this.collection.comparator = 'id';
this.collection.sort();
this.collection.trigger('reset');
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
var braintreeKey = isLocalhost() ? app.config.SANDBOX_PUBLIC_KEY : app.config.PRODUCTION_PUBLIC_KEY
var braintree = Braintree.create(braintreeKey);
// ...
params.cc_expiration_date = braintree.encrypt(params.cc_expiration_date)
params.cc_number = braintree.encrypt(params.cc_number)
params.cc_cvv = braintree.encrypt(params.cc_cvv)
$ccNumberInput.payment('formatCardNumber')
$securityCodeInput.payment('formatCardCVC')
var valid = $.payment.validateCardNumber(cardNumber)
var cardType = $.payment.cardType(cardNumber)
var isCvcValid = $.payment.validateCardCVC(cvv, cardType)
&:after { z-index: -1; position: absolute; content: ""; bottom: 15px; right: 5px; width: 50%; height: 8px;
max-width: 300px; background: hsl(0, 0%, 47%); box-shadow: 0 10px 10px hsl(0, 0%, 47%);
-webkit-transform: rotate(3deg);
}
/*jshint browser: true, onevar: false, strict: false, eqeqeq: false */
/*global IDBKeyRange, define, exports, module */
// index.js
// Provides easy interaction with indexedDB
// ---
// Part of the Riggr SPA framework <https://github.com/Fluidbyte/Riggr> and released
// under the MIT license. This notice must remain intact.
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
{
"asi": true,
"bitwise": true,
"boss": false,
"browser": false,
"camelcase": true,
"couch": false,
"curly": true,
"debug": false,
"devel": false,
/**
* Created by frank on 1/8/14.
* http://stackoverflow.com/questions/1184624/convert-form-data-to-js-object-with-jquery
*/
(function ($) {
$.fn.serializeObject = function (options) {
options = options || {}
var defaults = {
includeUnderscore: false,
exclude: []